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

How do I add certain amount of players to one team?

Asked by 10 years ago

I want to know how to add a certain amount of players to 1 team. This is the script that I have so far

01 blue = game.Teams.Blue --This defines the blue team. Make sure a blue team exists! 02 red = game.Teams.Red --This defines the red team. Make sure a red team exists! 03

04 function onJoin(player) 05 --define your function below 06

07

08 end 09

10 game.Players.PlayerAdded:connect(onJoin)

1 answer

Log in to vote
0
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

To change the team of a player, simply use the TeamColor property of Players and set it to the same color as the team you want the player to change to.

game.Players.Player.TeamColor = BrickColor.new("Really red")
Ad

Answer this question