How to teletransport a second player to a ReserveServer of the first player?

This question is the summary of this first one.

  1. A first player joins the game, creates a ReserveServer, and teletransport himself to it;
  2. A second player joins the game, retrieves the server id from the first player teletransport himself to it.

I’m not able to do this because the server code returned by TeleportService | Roblox Creator Documentation doesn’t match the reserved server code.

How to join a second player to a ReserveServer of a first player?

GetPlayerPlaceInstanceAsync returns a JobId which is different from a reserved server access code. The former is used to uniquely label the server while the latter’s purpose is in the name.

Developers commonly work around this issue by using a DataStore where the key is the JobId and the value is the private server code. This way you would just need to find out what the JobId of the target player is (GetPlayerPlaceInstanceAsync), feed that to a DataStore and get back the access code then use that to perform a teleport into the server.

2 Likes