So here's my script...
local tool = script.Parent local animation = script.Animation local animation2 = script.Animation2 local player = game.Players.LocalPlayer
tool.Equipped:connect(function() local character = player.Character local humanoid = character:WaitForChild("Humanoid") local animationtrack = humanoid:LoadAnimation(animation) animationtrack:Play() end)
tool.Unequipped:connect(function()
end)
So as you can see, the equipped function plays an animation and this is working fine, but I want to make something where if the tool is unequipped, the animation stops and that character goes back into its default position. What do I have to put into the unequipped function to do this? Is there some property I don't know about? Help!

2 comments
Please put your code in a code block please. Just click the blue Lua button and put your code there. Is should automatically format it for the most part. It makes it much easier to help you.
Try animation track:Stop(). If that doesn't work wait for someone smarter than me.