I've been trying to make an animation that is used when you hold the tool, but it doesn't seem to be working. The error I get says
Infinite yield possible on 'ReplicatedFirst.IfHolding:WaitForChild("Animation")'
My Script:
local animation = script:WaitForChild('Animation')
local humanoid = script.Parent:WaitForChild('Humanoid')
local dance = humanoid:LoadAnimation(animation)
Tool = game.StarterPack.Pitchfork
Tool.Equipped:Connect(function()
dance:Play()
end)
Tool.Unequipped:Connect(function()
dance:Stop()
end)
This script worked on another game I made but instead, I used it on an NPC, this time, I want to use it on the actual player itself. Thanks
