For specific players I want them to have a GUI that is set in my Lighting and have it cloned to them. However I get no errors and the following admins don't see the GUI, whats the problem here?
local admins = {"Pancakechop", "WaffleWhop"} local player = game.Players.LocalPlayer while not player.Character do wait() end local character = player.Character if player.Name == (admins) then o = game.Lighting.Obby1 ob = game.Lighting.Obby1:Clone() ob.Parent = player.PlayerGui if character.Health == 0 then wait(5) o:Clone() o.Parent = player.PlayerGui end end
First of all Lighting isn't for storage, put whatever is there into ReplicatedStorage. Second, if the game is FE, the client will not have access to the contents of Lighting, which is another reason its stored contents should be in ReplicatedStorage.
The actual problem here is that you're asking if player.Name==admins
which is not true; a string is not equal to a table. What you should do alternatively is write the table differently:
local admins={["Pancakechop"]=true,["WaffleWhop"]=true}
and check to see if a player is in the table by
if admins[player.Name]then