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

My Idle animation on a tool doesn't work... any ideas how to fix it?

Asked by
JoneXI 51
4 years ago

I have a tool. when you equip it it should play the idle animation I created, but it plays when I unequip it...

Script:

script.Parent.Equipped:Connect(function()
        local idle = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Idle)
        idle:Play()
end)

script.Parent.Unequipped:Connect(function()
    local idle = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Idle)
        idle:Stop()
end)

Answer this question