I want to make an admin panel that has a button (To open the admin panel frame) that only appears when a person’s name from the admin table is detected in the game so that only the admins can see it.
I cannot figure out how to do this though and I already tried making a pairs loop and other hard things.
local admins = {} -- ids
local panel = yourAdminPanelHere -- make sure this can be accessed by the server script
game:GetService("Players").PlayerAdded:Connect(function(p)
if not table.find(admins,p.UserId) then return end
local pgui = p:WaitForChild("PlayerGui")
panel:Clone().Parent = pgui
end)