Error occurs on the start of a test game.
Player = game.Players.LocalPlayer
Character = Player.Character
Humanoid = Character:WaitForChild("Humanoid")
Mouse = Player:GetMouse()
Anim = script.Swing
isswinging = false
Mouse.Button1Click:connect(function()
if isswinging == false then
isswinging = true
local s = Humanoid:LoadAnimation(Anim)
s:Play()
wait(0.8)
isswinging = false
end
end)

1 comment
if the player dies, they cant swing on respawn