How to stop animation when weapon is removed?
So I was able to get the weapon animations to work but whenever I remove the weapon the animation stays in place. I'm not sure how I can stop the animation when the weapon is unequipped. Here is the script
01 | local plr = game:GetService( "Players" ).LocalPlayer |
02 | local char = plr.Character or plr.CharacterAdded:Wait() |
03 | local h = char:WaitForChild( "Humanoid" ) |
04 | local anim = h:LoadAnimation(script.Parent:WaitForChild( "Animation" )) |
06 | local tool = script.Parent |
08 | tool.Equipped:Connect( function () |