Hello! I have been spending quite a bit of time trying to figure this out and nothing is seeming to work in the way I want it to. What I want to achieve is to play an animation backwards/in reverse. I’ve read a bunch of devforum posts on this and they all say use AdjustSpeed(-1)
but it is seemingly not working at all. https://i.imgur.com/j4Y98v0.gif
the code is:
local plr=game.Players.LocalPlayer
local char=plr.Character
local Humanoid=char:WaitForChild("Humanoid")
local CrouchAnim=Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.Crouch)
local CDB=false
local IC=false
local function Crouch(input, gameProcessedEvent)
if gameProcessedEvent then return end
if Humanoid.MoveDirection.Magnitude==0 and CDB==false and IC==false and input.KeyCode==Enum.KeyCode.C then
IC=not IC
CDB=true
CrouchAnim:Play()
CrouchAnim.KeyframeReached:Connect(function()
CrouchAnim:AdjustSpeed(0)
end)
wait(1)
CDB=false
elseif IC==true and CDB==false and input.KeyCode==Enum.KeyCode.C then
IC=not IC
CrouchAnim:Play()
CrouchAnim:AdjustSpeed(-1)
end
end
UIS.InputBegan:Connect(Crouch)
pls help if you have any idea on why this isn’t working, it may also be worth noting that this method of AdjustSpeed(-1)
never worked for me, ever