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

How would I make a permission list for this GUI?

I need a list of people to be able to have "access" to a GUI.

I have a script written up here that is only applicable to the owner though;

game.Players.PlayerAdded:connect(function(playa) if playa.userId==game.CreatorId then playa.CharacterAdded:connect(function(char) script.REF:clone().Parent=playa.PlayerGui; end ) end end )

If anyone could write up a new one for a list, that'd be helpful.

Thanks.

1 answer

Since you didn't attempt to write a script for checking player names I'll explain to you what you should do...

  1. Create a table that has a list of the names... local peeps = {"Your mom","Your dad","Your granpappy"}

  2. Create a for statement that will check people's name when they join so

3.If the name of the player is equal to a name on the able then give the player the so desired gui.

script will look something like this

local peeps = {"meow"}

function CheckPlayer(p)
	for _,u in ipairs(peeps) do
		if p.Name == u then
			return true
		end
	end
end

function OnJoin(player)
	local check = CheckPlayer(player)
	if check == true then
		--bleh
	end
end

game.Players.PlayerAdded:connect(OnJoin)

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