I made a tool and when you equip it, it is supposed to play an animation. I did that successfully. However when you unequip it I want it to stop the animaiton. How do I do that?
my code /
local player = game.Players.LocalPlayer
local tool = script.Parent
tool.Equipped:connect(function(mouse)
local char = player.Character
local prone = Instance.new("Animation")
prone.AnimationId = "http://www.roblox.com/asset/?id=1111949983"
local animloader = char.Humanoid:LoadAnimation(prone)
animloader:Play()
end)
don't mind the text "prone" it doesn't matter.

1 comment
The command is either :Stop() or :Pause() or something like that,