It is for a team changing gui. If you need the scripts please ask.
✓ ANSWER ACCEPTED
How do I make a script that I put in a gui, to make it so only certain people can click it?
1 answer
✓ Accepted answer
people={"PERSON NAME","PERSON NAME"} --Keep adding more for people who can click the gui
TEAMCOLOR=<BrickColor> --Change this to a color, brickcolor and teamcolor are the same thing
script.Parent.MouseButton1Down:connect(function() --Fires event when clicked
local player=script.Parent.Parent.Parent.Parent --Gets the player
for i,v in pairs(people)do
if player.Name==v then --Checks if player can change team
player.TeamColor=TEAMCOLOR --Changes team color to TEAMCOLOR
end
end
end)
Put that script in the gui, asuming the gui is some kind of button and it`s parent is a screengui which is parented to playergui this should work.
This discussion is preserved as it was. New answers, comments, and votes are closed.
