--Note: This script must be place in SeverScriptService
local Teams = game:GetService("Teams"):GetChildren()
game.Players.PlayerAdded:Connect(function(player) -- Runs when a player joins the game
if player then
if player.team == nil then
local RandomTeam = Teams[math.random(1, #Teams)]
player.team = RandomTeam
end
end
end)