local Teams = game:GetService("Teams") local T_Name = {"Blue Fighter","Red Fighter"} for _,player in pairs(game.Players:GetPlayers()) do if player and Teams then player.Team = Teams[math.random(, #T_Name)] end end
Try
local Teams = game:GetService("Teams") local T_Name = { [1] = "Blue Fighter", [2] = "Red Fighter" } for _,player in pairs(game.Players:GetPlayers()) do player.Team = Teams:FindFirstChild(T_Name[math.random(1, #T_Name)]) end