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

How do I make a script that allows certain people to be on a certain team?

Most of the scripts are for people in groups, I just want it to be specific people as there is no group.

2 comments

0

With a server script, simply make a table of the players' name, then have the script check whether a player satisfies the table by using a for loop (this will occur when the player enters the game). This concept is used in admin commands - the most simplified admin script in terms of readability I can think of at the top of my head is Person299's.

0

Along with what Red said. You will be using a Table. Start off with the PlayerAdded function, and from there use that Table to see what that players name is and decide what will happen.

1 answer

local specialteam = {"BL4CKBIRD","aquathorn321","BuilderMan"} --Names of players you want on team

game.Players.PlayerAdded:connect(function(player)
for i,v in pairs(specialteam) do --Iterate through specialteam
if  v == player.Name then --checks to see if player is on the list
player.TeamColor = "Bright red" --Change color to that of desired team
break
end
end
end)

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