Whenever I want to play an animation it plays the first frame and stops

I’m trying to make the player do an attack animation but when I press the button in the game it only plays the first frame and stops really quickly.

your string says: “every time you press” space "it shows Jonathan’s animation number 4.
So when you press “space” the player is positioned at figure number 4 and remains stationary like this.
You should work with “start animation”. Basically when you press “space” the player starts its animation (without putting it in loop) then performs the animation and stops on the last frame. When you press “space” again it continues.

1 Like

Thank you! How do I do that though?

first here you will insert the animation of the player. (you don’t have to tick on loop)

1 Like

then enter this string

obviously adjust the speed of the movement to your liking. I put 0.5 but it’s too slow that way. Test 0.2

I did it and it still doesn’t work. By the way its for an attack animation.

can you ask me this screen of your player?

Running maybe loop checked sole this

Ok, your sequence is right. On mine it works. There must be some interference in the code you wrote. Try to open a new science and put only your character and only the movement code in it. See how it goes

1 Like

Nope, I just tried it

It works! I am gonna try to do something with the other animations and see if it gets fixed. Thank you!

1 Like

Ok, it works! I think the Idle animation was stopping it from playing. Thanks again