#GUI question
26 messages · Page 1 of 1 (latest)
or simply clone it to that particular person's player gui folder
but i would prefer the whitelist system
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
how would I do that, sorry thats something I havent done before.
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
Thanks
ofc!
I can just type it in and itll indent itself
Should there be two "=" before ID
didnt work 😦
@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)
Where would I put the name of my GUI?
** You are now Level 7! **
"ScreenGui", replace that with the name of the gui
^
Put it in ServerStorage, and then get it via game.ServerStorage.GUI NAME HERE
Thank you. It works