Please help me get one.
COMMUNITY QUESTION
I need a script that loads a gui for a certain player when he joins the game. Do you have 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.
