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)
There is no function called Button1Click of Mouse.
Alternatively you could use
Mouse.Button1Down
Instead, and if you want as well, wait for the mouse to be released inside the function as well.