Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would you make it so only specific people/a specific person see(s) a GUI?

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!

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)

1 comment

0

Thank you!

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.