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

unexpected symbol near ''. how to fix?

error: 18:31:15.517 - Workspace.Part.Script:2: unexpected symbol near '?'

code:

script.Parent.ClickDetector.mouseClick:connect(click)?
local function click (player)
 player.PlayerGui.Hosvi.Frame.Visible = true  
end

any help would be great.

5 comments

0

Just remove the "?" and you are done :)

0

oh wait why is that there

0

the thing was invisible on my screen so i could not see it that is why. some weird character got in the script cause magic omg

0

And use ":Connect" since ":connect" is deprecated.

0

Is it?

1 answer

✓ Accepted answer

All of these are simple fixes and have been answered by Alphanium but I'll just be here to help clean your code and organize everything.

There's a "?" at the end of your function, keep those out! Also, note that ":connect" is deprecated so I recommend you using ":Connect" instead. Also you can clean up your code a bit by using the "TAB" button and by putting everything together as one.

Here's your cleaner code:

script.Parent.ClickDetector.mouseClick:Connect(function(Player)
	player.PlayerGui.Hosvi.Frame.Visible = true
end)

Again, everything has been solved by Alphanium and am just cleaning and organizing code!

Also, mark this as solved or something. I came here to help and just realized it was solved, lol!

If you have any questions or issues, please contact me. ;)

1 comment

0

the symbol was invisible on my screen lol, but when copy pasted it would be a question mark

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