I'm fairly new to Godot and I'm creating a game for a game jam, my problem is that when I start my game only the idle animation plays. I wanted to have a character selection thing but I decided against that halfway through making it, I deleted the code that would make that work but after the only animation that would play is the idle. I rewrote the animation player code to try and see what was wrong, I didn't notice anything wrong when I rewrote except it just wouldn't play.
#animates the player
if direction == 0 and is_on_floor():
animated_sprite.play("Knight_idle")
elif direction > 0 or direction < 0 and is_on_floor():
animated_sprite.play("Knight_run")
if not is_on_floor():
animated_sprite.play("Knight_jump")
if isAttacking == true:
animated_sprite.play("Knight_attack")
This is my script to animate the player but it just won't work. Please help me with this I'm making the game for a game jam and it is due at the end of October. Thank you!