If a player owns a Private Server on an experience, if they are teleported to the experience with TeleportService:TeleportAsync(game.PlaceId,{player}), they will be not be teleported to a public server, and they will be teleported to their private server. This happens when the only parameter in the function is the game’s place Id and the player, and teleportOptions are not specified.
Expected behavior
I expect the player to be teleported to a random public server when TeleportService:TeleportAsync(game.PlaceId,{player}) is called, and not be teleported to their private server if they own one.
Yes, it is the only thing being called. Here is the code:
ChangeServerEvent.OnServerEvent:Connect(function(player)
if ServerName == "Public" then
TeleportService:TeleportAsync(game.PlaceId,{player})
end
end)
This function is called when a player is on a Reserved Server (A player-created server that was created with TeleportService:ReserveServer(game.PlaceId) ), and they want to teleport back to a normal server that is not a reserved server. It only happens if they have a Private Server, and it is uncommon. This only started happening recently, about a few weeks ago, and I have not changed the code.
I think this is intended behaviour. It started happening a few weeks ago and it only happens when you were previously in a private server before you teleported.
I have had this in a real game before. It sent me and my friend in a “ghost” private server. Nobody was joining automatically, you could only join manually, and the server only showed if you were friends. I was teleported in that game too.
I used to use this function to send people back to public servers from a private server or a reserved server. I wrote a command for private server owners to kick players, and instead of player:Kick(), it teleports the player back to a public server to allow the player to keep playing without having to rejoin the game, but because teleportasync() teleports them back to the same server, it softlocks them.