#GUI question

26 messages · Page 1 of 1 (latest)

valid swan
#

make a whitelist system

#

or simply clone it to that particular person's player gui folder

#

but i would prefer the whitelist system

rigid laurel
#

Store the gui in replicated

#

In a script via the SSS

#

Check for the player's name or UserID

#

if it matches

#

then clone the script and parent it to the player's playergui

timber fossil
#

how would I do that, sorry thats something I havent done before.

rigid laurel
#
local ID = 1234
local Gui = game.ReplicatedStorage:FindFirstChild("Gui") -- replace with gui name
game.Players.PlayerAdded.Connect(function(player)
if player.UserID == ID then
local New = Gui:Clone()
New.Parent = player.PlayerGui
end
end)```
#

Indents were not included

#

So you'll need to add those in

timber fossil
#

Thanks

rigid laurel
#

ofc!

timber fossil
#

I can just type it in and itll indent itself

#

Should there be two "=" before ID

#

didnt work 😦

quick imp
#

@timber fossil
I'd do it like this:

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function()
        if Player.UserId == 52381317 then
            local AdminPanelClone = game.ServerScriptService.ScreenGui:Clone()
            AdminPanelClone.Parent = Player.PlayerGui
        end
    end)
end)
timber fossil
cursive cobaltBOT
#

studio** You are now Level 7! **studio

quick imp
timber fossil
#

Thanks

#

Where would I put the gui at. Replicated?

quick imp
timber fossil
#

Thank you. It works