Assigning one player to each team by Random (1 per team)

I’ve been trying to figure out ways so that at the beginning of the round it will take the 8 players and randomly put them into their own team (1 per team). I have the teams and a simple round timer set up, but I’m not sure where to start with developing this part.
I’ve looked around on the developer hub, but couldn’t find this so I wanted to see if anyone had any ideas.

Can’t you do something like this?

local Teams = game:GetService("Teams")

local function asignTeams(players: {Player})
	for index, team: Team in ipairs(Teams:GetTeams()) do
		if players[index] then
			players[index].TeamColor = team.TeamColor
		end	
	end
end

I understand where that’s going kind of, but how would I implement that into a round system? Still kind of new to LUA

well can’t you just call the function and pass it the players?

local playersInTheRound = {}
asignTeams(playersInTheRound)

The function only works if you have the same amount of players and teams