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

How do I make a Gui only visible for selected players?

I have a GUI called "fnrGui", it's a ScreenGui. How do I make it so only selected players in a script have the GUI?

3 comments

0

Do you mean like only this player has this gui, and this player too? (Like an admin panel)

0

Make the GUI be visible in PlayerGUI, this will make it visible for one player only ;)

0

"Make the GUI be visible in PlayerGUI, this will make it visible for one player only" What?? Putting the GUI in PlayerGui means putting it into StarterGui, meaning that it will be visible for all players. Scripting is required for this..

1 answer

Find the players name. E.G:

if plr.Name == "Bob" then
	fnrGui.Enabled = true
else
	fnrGui.Enabled = false
end

For multiple people to have it, try this:

if plr.Name == "Bob" or plr.Name == "kevin" then
	fnrGui.Enabled = true
else
	fnrGui.Enabled = false
end

This is a base to go off of. This is not a fully functional script, since the question is a bit of a request. If you have a question, comment about it.

2 comments

1

He can also use a table and a for loop

0

Good idea. A for loop is a perfect way of accomplishing this. If you're looking to do that instead just put all the players in a table.

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