here is script
local trackanimation = nil
script.Parent.Activated:Connect(function() trackanimation = script.Parent.Parent.Humanoid:LoadAnimation(script.Parent.Move) trackanimation:Play()
end)
All you would really need to do here is create an unequipped event and stop your animation within it. Good luck with the game you are making! (please put your code in code blocks next time)
here is the source code without the unequipped event added:
local trackanimation = nil script.Parent.Activated:Connect(function() trackanimation = script.Parent.Parent.Humanoid:LoadAnimation(script.Parent.Move) trackanimation:Play() end) script.Parent.Unequipped:Connect(function() trackanimation:Stop() end)