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

Is it possible to make GUIs only appear for specific players?

I am trying to make a gui only appear for a player with a specific name. Any suggestions?

2 answers

✓ Accepted answer
local player = game.Players.LocalPlayer
if player.Name == "DemGame" then
local playergui = player.PlayerGui
playergui.ScreenGui.Enabled = true
end

Yes, it's very easy to do.

This assumes that the GUI you want is in ReplicatedStorage and that this is a server script.

-- Assumes that player is already defined, try using a PlayerAdded event!
if player.Name == "Raccoonyz" then
	local clone = game:GetService("ReplicatedStorage").ScreenGui:Clone()
	clone.Parent = player.PlayerGui
end

2 comments

0

Sorry, it's inside of StarterGUI. Thank you though, I will probably use this in the future.

0

You could've just put it inside replicated storage...

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