Inability To Reverse Animation With :AdjustSpeed()

Hello. I am having trouble reversing my animation using :AdjustSpeed(). I recall doing this yesterday, so I am wondering if this is a bug. Have I overlooked something simple? Is anyone able to reproduce this issue when it should be working? If so, please let me know and I will create a bug report.

Refer here to read about :AdjustSpeed(), which says, “This function changes the AnimationTrack.Speed of an animation. A positive value for speed plays the animation forward, a negative one plays it backwards, and 0 pauses it.”

This code works, and it plays at the regular speed

local spin = script.Parent.AnimSaves.Spin
local spinHashId = game.KeyframeSequenceProvider:RegisterKeyframeSequence(spin)
animation = Instance.new("Animation")
animation.AnimationId = spinHashId
spinLoaded = script.Parent.AnimationController:LoadAnimation(animation)
spinLoaded:Play()

This code works and the speed is doubled

local spin = script.Parent.AnimSaves.Spin
local spinHashId = game.KeyframeSequenceProvider:RegisterKeyframeSequence(spin)
animation = Instance.new("Animation")
animation.AnimationId = spinHashId
spinLoaded = script.Parent.AnimationController:LoadAnimation(animation)
spinLoaded:Play()
spinLoaded:AdjustSpeed(2)

This code does not work, and the animation does not move at all

local spin = script.Parent.AnimSaves.Spin
local spinHashId = game.KeyframeSequenceProvider:RegisterKeyframeSequence(spin)
animation = Instance.new("Animation")
animation.AnimationId = spinHashId
spinLoaded = script.Parent.AnimationController:LoadAnimation(animation)
spinLoaded:Play()
spinLoaded:AdjustSpeed(-1)

Maybe you could try doing -2 instead?

I attempted multiple negative values, and none of them worked. Just tried -2 and nothing.

You need to set the time position before reversing it or it will not play. Playing backwards from the beginning won’t work.

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