I cant seem to get the players on the teams can anyone help? plrs is a table of players dont worry.
plrs = IsOrNotAfkTable(false)
local Red = Instance.new("Team", game:GetService("Teams"))
Red.TeamColor = BrickColor.new("Really red")
Red.Name = "Red"
local Folder = Instance.new("Folder", Red)
Folder.Name = "leaderstats"
local Hits = Instance.new("IntValue",Folder)
Hits.Name = "Hits"
local Blue = Instance.new("Team", game:GetService("Teams"))
Blue.TeamColor = BrickColor.new("Navy blue")
Blue.Name = "Blue"
local Folder = Instance.new("Folder", Blue)
Folder.Name = "leaderstats"
local Hits = Instance.new("IntValue",Folder)
Hits.Name = "Hits"
function assignTeams()
local balanceTolerancy = math.floor(#plrs / 2)
for i = 1, balanceTolerancy do
-- player's indexed here will go to team1
end
for i,v in pairs(plrs) do
--check if the player is on team1, if not then assign to team2.
end
end

1 comment
I have answered this question already a separate time you posted this question. Check my response there