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

How can i make an admin button gui only you and the people you choose can see?

i need help making a button to admin

1 answer

This belongs in a LocalScript.

All explaining done in the code, I wasn't able to test it, I believe it should work though.

local Player = game.Players.LocalPlayer -- Refer to the player
local Allowed = {"Player","Player1","Player2"} -- The people you want to be able to see the button

for _,v in pairs(Allowed) do -- Gather all the user's that are allowed
	if Player.userId == game.CreatorId or Player.Name == v then -- If their user id is the same as the creator id, or if their in the allowed table
		script.Parent.Visible = true -- Make it visible
	else
		script.Parent.Visible = false -- Make it invisible
	end -- End the if statement 
end -- End the gathering part

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