Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 9 years ago

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

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. Redbullusa 1580 — 9y
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. alphawolvess 1784 — 9y

Closed as Not Constructive by Redbullusa, DataStore, and EzraNehemiah_TF2

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 9 years ago
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)
Ad