Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make this punch script work? I need it done by tommorow and it's not working

So, I have this punch script, and it wasn't working from the start. I started editing it a bit, and I got somewhere, but I stopped around here.

wait(2)

local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
Anim = script.Animation

Mouse.Q:connect(function(key)
if key  "Q" then
s = player.Character.Humanoid:LoadAnimation(Anim) local human mouse.Target.Parent:FindFirstChild("Humanoid")
if mouse.Target.Parent:IsA"Hat" then
	human=mouse.Target.Parent.Parent:FindFirstChild("Humanoid")
end
if human then
	human.Health=human.Health-10
end

end(
Q.Play()

This is what I got when I played the game. 21:30:20.258 - Players.Player1.PlayerGui.LocalScript:20: ')' expected (to close '(' at line 17) near ''

2 answers

At the end of the script, the "end(" is not correctly placed. Change it to a closed parenthesis.

This discussion is preserved as it was. New answers, comments, and votes are closed.