Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 7 years ago

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 '<eof>'

2 answers

Log in to vote
0
Answered by 6 years ago

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

Ad
Log in to vote
-1
Answered by 7 years ago

Try checking line 17 "end(" should be "end)"

Answer this question