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

How to put players into teams?!

Asked by 8 years ago

I have two teams Criminals (Bright Orange) and Cops (Bright Blue) How would i move players from a lobby team into these two teams Thanks!

1 answer

Log in to vote
2
Answered by
4Bros 550 Moderation Voter
8 years ago

To change a player's team, you need to change their TeamColor property which is a brickcolor value. Simply set their TeamColor property to the teamcolor of the team. Also make sure their Neutral property is false.

local players = game:GetService'Players'
local player = players:FindFirstChild'PlayerName'
player.Neutral = false
player.TeamColor = BrickColor.new("Bright blue")
0
Thank you! You have just made my day Bennymax3333 0 — 8y
Ad

Answer this question