I have a round based team game. I want the teams to be randomly assigned when the round starts. I know that teams have an auto assign feature, but I don't want players to be auto assigned when they join, but rather when the round starts. How would I do this? Here is a script I used:
for _, v in pairs(game.Players:GetChildren()) do
Player = Instance.new("StringValue", workspace.Players)
Player.Name = v.Name
local f = math.random(1,2)
if f == 1 then
v.Team.BrickColor = BrickColor.new("Red")
else
v.Team.BrickColor = BrickColor.new("Blue")
end
end
This script just randomly assigns players.

4 comments
Show us what you have tried -- this is not a request site.
https://scriptinghelpers.org/help/how-post-good-questions-answers
Do you want the teams to be even?
Yes.