I'd like to know how to make it so only a specific person sees a GUI. I think I have it, but I haven't tested it yet. It's for a game I'm currently making, for an admin panel. If anyone could help, thanks!
✓ ANSWER ACCEPTED
How would you make it so only specific people/a specific person see(s) a GUI?
2 answers
✓ Accepted answer
Wrote you a little code block to help. It's a serverscript, put it in ServerScriptService and put the Gui inside it. Then put the following code in. YOU MUST DISABLE RESETONRESPAWN ON THE GUI
local whitelist = {
"MachoPiggies:MyUserId", --// Example
}
game.Players.PlayerAdded:Connect(function(plr)
for i,v in pairs(whitelist) do
if v:lower() == tostring(plr.Name:lower()..":"..plr.UserId) then
local UI = script:FindFirstChildOfClass("ScreenGui"):Clone()
UI.Parent = plr.PlayerGui
end
end
end)
Easiest way is probably disable the visibility of the UI, add a local script and if the user is whitelisted to have the ui, enable the visibility, of not then delete the UI itself.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thank you!