How to teleport a player to a server with less players compared to a server with more players?

So i’m making an FPS game, and it has different game modes. It has a place called 4v4. So in the 4v4, you get teleported to a server inside the place. How can I teleport a player to a server that needs more players, like a server with 1-4 players compared to a server with 5-8?

You might have to try something with a global data store or a non roblox server for http requests.

Data stores. Ah. So I could just store the JobId and Players of each server in a table in a global data store, and do math on the teleporting code. Thanks for the answer, I didn’t think of that!

You would have to reserve a server with code like this:

local tpser = game:GetService("TeleportService")

tpser:ReserveServer(idofyourplacefor4v4)

anyways the 4v4 would have to be a seperate place under the game since your teleporting players from all over into it.

It is, it’s a place under the universe

ok so basically where it says idofyourplacefor4v4 put in the place id in there.

Alright. I’ll try it tomorrow!

I have never used code like this and i do not have the time to experiment with it right now, but if you look here it has documentation that explains what you need to do. if this helped you please accept it as an answer so that in the future people can look back upon this and see the solution.