In my game, there are created teams at the start of the game. The available teams are put into a table, TeamsTable, and the available players are put into a table, PlayersTable.
How would I divide the players into x amount of teams, leaving the remainder (if any) into a seperate team?
My Script
for _, Team in pairs (TeamsTable) do
for i = 1, math.floor(#PlayersTable/#TeamsTable) do--Equation doesn't work
--Assign players to team here.
end
end
Although these solve the problem of initially sorting the players into teams, I’m trying to put the remainder of the players (if the players didn’t divide into the teams equally) into a team that’s meant for remainder players (if any) @ExcessEnergy @FerbZides
Didn’t see under the link on Excess’ reply, that solves it, thanks.