Teleporting a player using TeleportService:TeleportAsync(game.PlaceId,{player}) teleports them to their Private Server

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.

5 Likes

I can’t reproduce this. Does it only occur if there’s no other players in the experience at the time of teleporting?

2 Likes

No, it occurs even when there are many players in the experience. It happens in this game: Feather Family [Peryton] - Roblox

1 Like

Are you sure you are calling only

TeleportService:TeleportAsync(game.PlaceId, {player})?

and not anything else? I cannot reproduce this issue.

1 Like

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.

1 Like

Oh, I wasn’t aware of this change. Is it possible to make it so TeleportAsync only sends you to a public server and not your private one?

You could get a random public server’s JobId and put it in the TeleportOptions for TeleportAsync.

It could be a bug where ReservedServers are being incorrectly detected as Private Servers. Will mention @SuperPat77 to clarify.

1 Like

Thanks for the report! I filed a ticket in our internal database and we’ll follow up when we have an update for you.

2 Likes

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.

1 Like

Hi, this is expected behavior. Please let us know if this is still of concern. Thanks!

If this is intended, then how are you meant to send players back to public servers?

1 Like

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.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.