i am trying to update my walk animation everytime a certain button is pressed, but it takes like 2-3 seconds to start/stop and i have to do some messing around for it to work, iss there a way it can instantly play the walk animation?
--running
running = false
game:GetService('UserInputService').InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftControl and running == false then
running = true
walk.AnimationId = 'http://www.roblox.com/asset/?id=476653440'
humanoid.WalkSpeed = 40
elseif input.KeyCode == Enum.KeyCode.LeftControl and running == true then
running = false
walk.AnimationId = 'http://www.roblox.com/asset/?id=476341652'
humanoid.WalkSpeed = 16
end
end)

1 comment
If you don't want to do this, then try stopping and starting the animation track.