How to reverse an animation

I don’t know what category to put this in, my friend lent me an animation I want to use for my game but it looks better when it is backwards, I would like to reverse it basically.

I have tried
finisherAnim:Play(0.100000001, 1, -1)
but it did not work for some reason, I have also tried

finisherAnim:Play()
finisherAnim:AdjustSpeed(-1)

but this also didn’t work and just didn’t play the animation at all. Just mentioning I am using Moon Animator 2 so if there are any tricks to know how to do this stuff or something I would like to know (if there are any of course).

Thanks for any help in advance.

maybe this could help?

Maybe because the animation will always play from the start, and when you reverse it plays from the end.

Try setting the position to the end and play it reversed.

finisherAnim:Play()
finisherAnim.TimePosition = finisherAnim.Length
finisherAnim:AdjustSpeed(-1)

this one doesn’t play the animation at all for some reason

i’ve just tried this one and it also didn’t play the animation at all

Are you loading the animation, can you show the full code?

elseif ehumanoid.Health - 6 <= 0 then
	print("Finisher")
	
	humanoid.WalkSpeed = 0
	humanoid.AutoRotate = false
	
	local finisherAnim = humanoid.Animator:LoadAnimation(animsFolder["1"].Finisher)
	finisherAnim:Play()
	finisherAnim.TimePosition = finisherAnim.Length
	finisherAnim:AdjustSpeed(-1)

	stunModule.Stun(ehumanoid, 20)
	hitSFX(hit.Parent)
end

this is only a little bit of it since the entire script is quite large

this is the anims folder:
image

Okay we need to check smth first, try this:

finisherAnim:AdjustSpeed(0.1)

that played it slowly, as it should

i printed the track length after playing and it returned 0, and when i added a wait(1) between the loading of the animation and the play it returned the value of the length, maybe its not loading fast enough to get the length with how fast the script is running?

That might be true, Try it again but with a slight small wait after :Play()

ive got it to work now, i added a 0.5 second wait and temporarily froze the first animation and it is flowing very nicely. thanks for your time and help!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.