Problem with changing 2d animations related to actions

Godot Version

4.7.1 stable

Question

I have a problem with playing animations. I have 3 animations in my platformer: idle(autoplay), jump and run. Only idle is working fine. When ‘run’ should play - character is moving without any animation but with the fist frame of animation. When ‘jump’ should play - the first frame of idle animation plays… I can’t upload a video here for some reason… I hope someone knows how to fix this problem

With the current structure of your if statements, you’re overwriting your animations on each frame.

Put some print() statements next to your animation triggers, you’ll better understand what happens on each frame.

Please also check Posting guidelines in #Help channel to see how to properly share your code snippets.