Is there any way to make 2 players go to the same server using teleportservice

Hello, So I’m making a duels mode for my game. And in order to do so it will have to teleport the 2 players into a new game instance. But my one question is how can I make sure that one group of players won’t go to another group. I made the max players in that game to 2. But lets say one guy leaves and the other guy doesn’t then what’s saying that one of the players won’t go to that old server? Thank you for any help.
If you have any questions then you can say them below.

Hello (again), for your duel system i would recommend creating ReservedServers then teleporting the two players to this server

but i didn’t understand what you meant with

2 Likes

I mean like, if one opponent rage quits but one stays in the game. then how can I prevent another party of people going into that same server

Well, with ReservedServers, it’s like a VIP Server, but created by the server so no one can join and you could possibly kick the other player. I’m currently using this method for a horror game and it’s pretty useful

1 Like

I thought reserved servers were for VIP servers. Turns out it just reserves the server for people. Thanks for the help(again)!

1 Like

No problem(again)! I also use datastores to transfer data from the public server to the reserved server, anyways if you need help, hmu!

1 Like

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

You can pass an array of players (multiple player instances in a single table value) as the second argument to TeleportAsync which will teleport both players to the same server of the specified place ID which is passed as the first argument to the same function.