Hi, so I had this idea to create a Folder in Workspace called "Admins" and add BoolValue's inside. These BoolValue's would each be named after a person that is considered an Admin. These BoolValue's are manually added in studio, not via a running script.
Now, what I want to do is use a server-sided script to check if a user's name is found in that folder, and if so, he would (For example) receive a GUI. But, if their name isn't found in the list, nothing would happen.
I'm having issues with extracting the Children from this folder into my script, but this is what I've tried so far;
game.Players.PlayerAdded:connect(function(player)
local folder = game.Workspace.Admins
local name = player.Name
if name == folder:GetChildren().Name then
script.ScreenGui:Clone().Parent = name:WaitForChild("PlayerGui")
end
end)
The script waits till the user joins the game, then checks if your name is in the Folder as a BoolValue, and if so, your GUI appears on your screen.
I get no errors whatsoever, the GUI just simply does not appear on my screen, nor in my Player's PlayerGui.
NOTE: I added the GUI to the Player's PlayerGui because I have no clue where else to put it to ensure the player still has the GUI upon respawn. Haven't tried a CharacterAdded function yet, could this work? Thanks!

1 comment
This works, thanks! I realize now I indeed checked player.Name, whilst simply "player" already connects me to the exact same path. I'm no expect in loops, but I kind of understand the way you went with the for _,v in pairs loop. Appreciate the quick response!