Hello. I am creating a game and while doing some scripts i had this error: Expected identifier when parsing expression, got ')'. I don't know why it happend and I would love some help from you guys. Thanks in advice.
CODE:
script.Parent.Touched:Connect(function(hit)
if game.StarterGui.Eggs.Egg1.Visible == true then
game.StarterGui.Eggs.Egg1.Visible = false
end)
END OF THE CODE, ERRORS:
(
(Error says it's last line, 'end)'.)
(After deleting ')' at 'end)' it says: "Expected 'end' (to close 'function' at line 1), got ; did you forget to close the 'then' at line 2? ")
Problem got solved, but I don't know how to mark correct answer as good answer.

6 comments
@Leamir you helped me, but I don't know how to mark answer as accepted, this is my first scriptinghelpers questoin.
Right under the comments section, should have a "Accept Answer" button
@Leamir Still I can't find it...
https://prnt.sc/ttfx5a << screenshot of the button (on the answer coment section)
@Leamir Yeah I don't have it. Probably reputation required or something like that.
Screenshot of the website that I see https://prnt.sc/ttfzoq