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

I need a script that loads a gui for a certain player when he joins the game. Do you have one?

Please help me get one.

1 answer

You can do this by doing this:

local Player = game.Players.LocalPlayer

local Gui = script.Parent

local WhiteListedPlayers = {"plrname","plrname"} -- Player Names

for i = 1,#WhiteListedPlayers do
	if Player.Name == WhiteListedPlayers[i] then
		Gui.ResetOnSpawn = false
		Gui.Parent = Player:WaitForChild("PlayerGui")
	else
		Gui:Destroy()
	end
end

this need to be inside an local script thats inside the gui

put the gui inside StarterPlayer > StarterPlayerScripts

i hope this works

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