As a Roblox developer, it is currently very difficult to pass initial data to the server you are teleporting players in to.
Right now, I have a lobby system set up and once a lobby fills up, it teleports players to a reserved server (created using TeleportService:ReserveServer(PLACE_ID)
). In this server, we require key information in order to start the game: for example, the mode, the map name, teams, etc.
Our current workaround is using TeleportService:TeleportToPrivateServer()
and passing in the information we need in the teleportData
parameter. In the server that players are teleporting into, we
- Wait until the first player joins the server
- Get their teleport data
- Retrieve the map name from the teleport data (ex. TeleportData.Map)
- Finally load in the map
There are two issues with this:
- The data is not guaranteed to be safe as it is transmitted alongside the client.
- We can’t have the server start loading stuff in until a player joins.
If Roblox is able to pass in optional arguments when calling TeleportService:ReserveServer(), it would allow developers to rely on passing data between teleports securely and it would allow a cleaner implementation of scenarios where we need to know certain data before we can start the game.