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

Roblox Gui visible only for sepecefil people?

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

1 comment

0

I NOT "SPECEFIL"

1 answer

✓ Accepted answer

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.

7 comments

0

Alight buddy checking it out

0

Alright buddy thanks!

0

Np

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

0

The kickbutton is not visible in the propreties

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.