As a Roblox developer, it is currently too hard to teleport two players from different servers to the same reserved servers without possible edge cases.
If you want to teleport multiple players to the same ReservedServer based off of a key, this is how you might do it
local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")
local DSS = game:GetService("DataStoreService")
local DS = DSS:GetGlobalDataStore()
return function(key)
local code = DS:GetAsync(key)
if type(code) ~= "string" then
code = TS:ReserveServer(game.PlaceId)
DS:SetAsync(key,code)
end
return code
end
You’d use a function like this
to translate the key into a ReservedServer code that is stored using DataStore.
The problem with this is that DataStore is Asynchronous.
If two players try to teleport to the same server at once, there’s a chance that the ReservedServer code is overwritten. If this happens, the players will teleport to two seperate ReservedServers.
The overly complicated solution to this would be to use something with session locking, like ProfileService. (not entirely sure how ProfileService has session locking if datastore is async)
You’d create a new profile for the key and store the ReservedServer code in that profile.
This seems a bit much for something so simple. Why can’t Roblox handle this for us?
I wish I could just do something like
TeleportService:TeleportToPrivateServer(4419893655,"whatever i want",{game.Players.dispeller})
I also don’t see why ReservedServer Access Codes and PrivateServerIds have to be two different things. Maybe make PrivateServerId only visible on the server side and use that for everything.
If Roblox is able to address this issue, it would improve my development experience because Reserved servers would be easier to use properly.
Use Case
I could see this as being useful for developers who want to create cross-server dueling systems.
Personally, I’m working on a game with infinitely generated terrain.
When the player reaches the edge of the map, they get teleported to another reserved server.
The world is basically a grid of reserved servers that players teleport between. Each server has a world generated with the coordinate as the seed.

in the above image, I tried to illustrate a scenario where this edge case could occur.
Red and Green are players and the arrows show the direction they’re traveling.