Play half of Animation on KeyDown/Other Half on KeyUp


So I’ve been searching around haven’t found anything about being able to play the animation that I want.

So when the user presses a button in my game, it will play half of the animation and STAY paused at the end of the half of the animation. But if the user is to release the button, it will then play the next the next half of the animation.

So I’ll give it a go:

function Update()

I already know it’s wrong… If anyone can help me, I’d really appreciate it.

It’s probably easier to split that animation in two, then playing the first one once when the user press the key and play the second one when the key is released