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

Expected 'end' (to close 'function' at line 1), got <eof>?

good morning! so today i made a menu screen with a settings button and a play button when i click the settings button it keeps giving me this error:

Players.NexterDev.PlayerGui.Menu.PLAY.SETTINGS.LocalScript:2: Expected 'end' (to close 'function' at line 1), got

here is my script:

script.Parent.MouseButton1Click:connect(function()
game.StarterGui.Menu.PLAY.SETTINGS.SettingsFrame.Visible = true

1 answer

✓ Accepted answer

You need to add an end with a closing bracket at line 3 to let the script know when to end a function.

script.Parent.MouseButton1Click:connect(function()
game.StarterGui.Menu.PLAY.SETTINGS.SettingsFrame.Visible = true
end)

2 comments

0

i know this may seem picky but that non indented line 2 makes my eyes burn

0

it works now, thanks!

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