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

GUI for me and a few people not working. How can I fix it?

I'm trying to make a roblox gui only visible to me and a few friends, however the first comma in the script has an error. The error says "Expected 'then' when parsing if statement, got ',' .

Here is the code:

if game.Players.LocalPlayer == {"ThrashIsDead","poophead27272","darkslayer741"} then
	script.Parent.Visible = true
else
	script.Parent.Visible = false

Help is much appreciated, I've been trying to figure this out for an hour, but I haven't been able to.

1 answer

You could change the first line to look like this:

if game.Players.LocalPlayer == "ThrashIsDead" or "poophead27272" or "darkslayer741" then

Also, it looks like you forgot to put "end". You should also make sure this is in a local script, and not a regular script, because only local scripts can find a local player.

1 comment

0

Thank you for this, however it still shows up for people that are not on the list. If you have a different fix it is much appreciated.

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