This code is meant to press a button down
script.Parent.Touched:connect(function(pressed) -- fuction that checks for press if pressed and pressed.Parent and pressed.Parent:FindFirstChild("Humanoid") and script.Parent.IsNotPressed == true then -- checks if its being pressed by a player and if it hasnt already been pushed pressage() -- function that moves the button else print( "its already pressed dummy" ) end end end -- error : 29: ')' expected (to close '(' at line 22) near 'end' end)
At the second to last end
statement, the console throws out Workspace.button.counter:29: ')' expected (to close '(' at line 22) near 'end'
and my script breaks.
I can't understand the the error is trying to say.
fixed!
I had too many end
s in my code
just shaving it down a bit fixed it
script.Parent.Touched:connect(function(pressed) -- fuction that checks for press if pressed and pressed.Parent and pressed.Parent:FindFirstChild("Humanoid") and script.Parent.IsNotPressed == true then -- checks if its being pressed by a player and if it hasnt already been pushed pressage() -- function that moves the button else print( "its already pressed dumbass" ) end end)