Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a Gui show up for certain people?

Asked by 8 years ago

I want to make an Admin Gui that shows up for certain people. I've been searching, but I can't find anything.

2 answers

Log in to vote
1
Answered by 8 years ago
-- A simple one for non-experienced coders. Put this in a "LocalScript" and put it inside the Gui. Change the names in "Admins" to who you want to be able to use it and leave the Gui in StarterGui.

local Admins = {
    "darkelementallord",
    "ThatGuy",
    "Meh"
}

local Allowed = false

for _,n in pairs(Admins) do
    if (n:lower() == game.Players.LocalPlayer.Name:lower()) then
        Allowed = true
        break
    end
end

if (not Allowed) then
    script.Parent:Destroy()
end
0
Thank you, this works. SimplyRekt 413 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

To make a gui show up for certain people, you must insert it into their PlayerGui. The PlayerGui object is a container that holds a Player's user GUI. So, we want to insert the gui we are making, into the playergui of the player that we want to have the gui onscreen.

Answer this question