How to make players stay in the same team across teleports?

I am making a 2v2 system, and the current problem I am facing is that I don’t know what is the best way to make the players who teleport stay on the same team with their friend. I was looking at teleportData using TeleportService:TeleportPartyAsync but I am not sure what would be the best way to set the teleportData.

Would I use a Remote Event on the clients and set the teleport data on the client, or am I able to set the teleport data of players on the server?

Can’t you just pass a table containing a table with a player then their team.
{{Player1, Red}, {Player2, Blue}, {Player3, Red}, {Player4, Blue}}

https://developer.roblox.com/en-us/api-reference/function/TeleportService/TeleportPartyAsync

2 Likes