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

What do I do when there is a script error notably "Error at line 17, ')' instead got '('?

I tried to add ')' instead of '(' and instead of fixing it went to the next line of code and said there was an error for that line, then before I knew it the whole script was apparently made "error" (I have 78 lines of code)

1 answer

This is typically caused by either forgetting to put a ) character by an end keyword, or forgetting an end keyword all together, or even forgetting to close some function call. Make sure your script is not missing the keyword on any if statements, functions, while loops, etc. If that isn't the problem, then check to see if you forgot to add a ')' on some specific function. This could be something like:

game.Players.PlayerAdded:Connect(function(plyr)
	plyr.CharacterAdded:Connect(function(char)

	end --doesn't have ) character
end) --does have ) character

or

local x = math.ceil((5 / 2) * 3 + (1 + 2) --forgot to close the math.ceil call
local y = 5 + 2 --error will probably say there is something wrong with this line, rather than the one above.

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