I am trying to get my animation to run when a player activates the tool. I have tried many times and it has not worked. Local Script inside of the tool:
script.Parent.Equipped:Connect(function(Mouse) Mouse.Button1Down:Connect(function() animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation) animation:Play() end) end)
script.Parent.Unequipped:Connect(function() animation:Stop() end)
Try this idk
local animation local mouse = game.Players.LocalPlayer:GetMouse() script.Parent.Equipped:Connect(function() mouse.Button1Down:Connect(function() animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation) animation:Play() end) end) script.Parent.Unequipped:Connect(function() animation:Stop() end)