Animation only plays the first frame

hi all~~
I have a problem where my animation only plays the first frame and stops.
I have checked the art asset , the animation is there and is on the prefab animation list.

Here is my code

if(Input.GetKey(KeyCode.UpArrow)||Input.GetKey(KeyCode.DownArrow)){
		if(!player.animation.IsPlaying("climb")){
			player.animation.Play("climb");
					}

I am not sure if I miss something~~any advice would be great ~~thanks

And you have no Reference exception error ?

Did you set your animation to play Once ?

Try animation.Play()

Try commenting out your condition to see if its the statement.

Turn off can transition into self it will be in the animation settings withing the animator

1 Like

ahhh, it’s not that it’s only playing the first frame, it’s just constantly restarting the animation because it can transition from any state to itself. Thanks!