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 pop up for me but not for others?

Asked by 5 years ago

I've seen some games where only the creator had a Gui and others not. How do I do that?

0
You clone it on a PlayerAdded event and check if you're the owner SirDerpyHerp 262 — 5y
0
Sorry I don't know how to do that I am new to lua Ima4mig0 -3 — 5y

1 answer

Log in to vote
0
Answered by
iladoga 129
5 years ago

This is in fact very easy! All we need to do is add a player added event and check if the player is the owner!

Out this in a server script in worskapce or ServerScriptService.

local owner = "OWENRNAMEHERE"
local gui = game.ServerStorage.Gui

game.Players.PlayerAdded:connect(function(plr)
    if plr.Name == owner then
        gui:Clone().Parent = plr.PlayerGui
    end
end)

replace the "gui" variable with your gui location. And obviously the owner name string to your name.

Have a good one!

Ad

Answer this question