I have a tool with a localScript inside and an Animation with my animation Id inputted in properties already.
local cd = false
script.Parent.Activated:Connect(function()
if cd == false then
cd = true
game.Workspace.Events.MainEvent.AddTrust:FireServer()
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local anim = script.Parent.Animation
local Track = Humanoid:LoadAnimation(anim)
Track:Play()
Track:Stop()
script.Parent.Enabled = false
wait(5)
script.Parent.Enabled = true
cd = false
end
end)
When the tool is clicked then fire a RemoteEvent (unrelated) and play the animation, wait for it to finish playing then stop. However, this script doesn't work. No error found in output

2 comments
try removing line 13, it stops the animation immediatly after it starts to play
Thanks, Removing line 13 worked!