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

How do I get an animation to load when the tool is equipped?

Asked by 4 years ago

I've tried almost everything I know and I still can't get it to work, can somebody please help me?

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Have you tried using the Tool.Equipped() event, then put the code inside? This will make it so it plays whenever they equip the Tool.

Ad
Log in to vote
0
Answered by 4 years ago
local IdleAnim = Humanoid:LoadAnimation(script.Parent.AnimationsName)

script.Parent.Equipped:Connect(function()
    IdleAnim:Play()
end)
script.Parent.Unequipped:Connect(function()
    IdleAnim:Stop()
end)

Answer this question