Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I revert to my original animation?

Asked by 7 years ago

I have a local script in a tool that changes the character's default idle and walking animation, but when I revert back to the original walking animation, it doesn't loop like it's suppose to. This is the code, The tool.equip is the animation that it changes to, tool.unequip is the original animation.

tool.equipped:connect(function()
    int.Value = 1
    print(int.Value)
    while not player.Character and int.Value == 1 do wait() end
    player.Character.Animate.walk.WalkAnim.AnimationId = 'http://www.roblox.com/asset/?id=619848002'
end)
tool.unequipped:connect(function()
    int.Value = 0
    print(int.Value)
    while not player.Character and int.Value == 0 do wait() end
    player.Character.Animate.walk.WalkAnim.AnimationId = 'http://www.roblox.com/asset/?id=161210451'
end)

Answer this question