local plr = game.Players.LocalPlayer local attack = false local mouse = plr:GetMouse() local char = plr.Character script.Parent.Activated:Connect(function() local hum = char.Humanoid:LoadAnimation(script.Parent.Animation or script.Parent.Animationsd) script.Parent.Blade.Trail.Enabled = true hum:Play() attack = true wait(.50) hum:Stop() script.Parent.Blade.Trail.Enabled = false script.Parent.Blade.Touched:Connect(function(hit) local hum = hit.Parent:FindFirstChild("Humanoid") if hum ~= nil and attack == true then hum.Health = 0 attack = false end end) end)
You don't need to stop the animation, it stops automatically. If you want to disable the trail after it stops, use:
hum.Stopped:Wait()