I have 3 tools that use this script and only 2 of them work. The third one only works in studio.
script.Parent.Equipped:Connect(function() local animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation) animation:Play() script.Parent.Unequipped:Connect(function() animation:Stop() end) end)
Try this and see if it works
script.Parent.Equipped:Connect(function() local animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation) animation.Priority = Enum.AnimationPriority.Action animation:Play() script.Parent.Unequipped:Connect(function() animation:Stop() end) end)
Solved it myself. If anyone find this in the future. It is because the animation was uploaded to my profile. It was meant to be uploaded to the group.