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

Roblox Gui visible only for sepecefil people?

Asked by 4 years ago

This is suppose to be a kick panel visible only for people I whitelist, but it doesn't work and it says in the Output : "PlayerGui is not a valid member of StartGui"

local WhiteList ={"PLAYNAME"}
local player = game.Players.Name
    --this script goes in the Gui. It removes if the owner has no gamepass
    plr = script.Parent.Parent.Parent --Should lead to parent of PlayerGui (startergui)
    repeat wait() until plr.PlayerGui
    if not player == WhiteList then
        script.Parent:Destroy()
    end
--This should make me see the kick panel--

Anybody help ? thanks

0
I NOT "SPECEFIL" Prestory 1395 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Try this,

player = game.Players.LocalPlayer
if player.Name == WhiteList then
gui.Visible = true

Try it out, if it doesn't work let me know.

0
Alight buddy checking it out fortesss7 40 — 4y
0
Alright buddy thanks! fortesss7 40 — 4y
0
Np BANSA168 15 — 4y
0
Wait, never mind, it doesn't appear when i put my username in the box? what i do ? local WhiteList ={"fortesss7","NEXTBlGTHANG"} player = game.Players.LocalPlayer local gui = script.Parent.KickButton if player.Name == WhiteList then gui.Visible = true end fortesss7 40 — 4y
View all comments (3 more)
0
The kickbutton is not visible in the propreties fortesss7 40 — 4y
0
Ohh I see, try adding to Whitelist part this, Whitelist[1] or Whitelist[2], that way you will tell the script what you want from the table BANSA168 15 — 4y
0
Also the reason it's not visible in properties is probably because you're checking the one that's in startergui but the one you changed is in Players/Player/PlayerGui BANSA168 15 — 4y
Ad

Answer this question