Hello. When I use my code, the animation gets stuck and keeps looping at the first frame while holding the up key. Doesn’t even play all the way through. Help?
Well, on every frame while the up key is held, you tell the animation to play. You think “play” means “start this animation, or continue it if it’s already started,” but it doesn’t. It means “start this animation from the beginning.” So if that’s not what you want, Don’t Do That.
One possible fix would be to have a separate check for Input.GetKeyDown(“up”), and play the animation there (i.e. only when the key is initially pressed).
Sorry for not replying for almost a month. But I used your idea of GetKeyDown when I saw your reply a few weeks ago and it worked! Thank you. Much appreciated.