I'm currently stuck. I'm trying to make this character move left and right with different animations for it. However i noticed that when I would try and press the right button it doesn't move. like no animation and doesn't move. It moves left with the animation.
export (int) var speed = 45
onready var animatedSprite = $AnimatedSprite
var velocity = Vector2()
var axisX = Input.getactionstrength("uileft") - Input.getactionstrength("uiright")
if axisX != 0:
animatedSprite.animation = "walk"
animatedSprite.animation = "idle"
velocity = move_and_slide(velocity)
velocity.x += 1
velocity.x -= 1
velocity.x = 0
velocity = velocity.normalized() * speed