More problems with animations

So I finally got my animation to play when I hit a log, but the animation reverses and I spring back up. Here’s my problem in a video: (Sorry for It being laggy)


Here’s my animation:

I want the player to stay on the ground after they fell.

I’m not the best when it comes to animations but I believe you have to set the animation speed to zero just before the end of the animation.

(You can make this easier by extending the length at the end of the animation)

You can find more information on that here.

1 Like

Thanks, I’ll test that when I get back on pc and let you know

Get the animation length (u can find that in the editor just by looking at the time)

code:

Anim:Play()
wait(0.05) -- Ur length is 0.06, So I set it to 0.05 so it doesnt spring back
Anim:AdjustSpeed(0)
1 Like

I waited 0.05 seconds, but it stopped way too fast.

Edut: Nvm, I didn’t set the the fps to 100

The issue here appears to be in the length of the animation. When an animation ends, Roblox will automatically stop playing the animation and move onto another one which is still playing (assuming there are any other animations which are playing, in which case it’ll just stop the animation).

What you can do is copy the keyframes for the pose where the character is supposed to be on the floor, and paste them at a later point in the animation’s timeline. Then, when the animation is supposed to stop playing, you can set up a wait() and then stop the animation. Though for this to work, the animation needs to be long enough. Example:

Anim:Play()
wait(1)
Anim:Stop()

Additionally, you could just paste the keyframes at the time where you want the animation to end and let the animation stop on its own, but you wouldn’t be able to edit how long the transition is between animations when you use that.

1 Like