TeleportAsync doesn't work as documented

Reproduction Steps

Code
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")

local HttpService = game:GetService("HttpService")

local TeleportService = game:GetService("TeleportService")

RemoteEvent.OnServerEvent:Connect(function(player: Player, instruction: string)
	if instruction == "Teleport1" then
		TeleportService:TeleportAsync(game.PlaceId, {player})
	elseif instruction == "Teleport2" then
		local teleportOptions = Instance.new("TeleportOptions")
		teleportOptions.ServerInstanceId = HttpService:GenerateGUID(false)
		TeleportService:TeleportAsync(game.PlaceId, {player}, teleportOptions)
	end
end)

TeleportAsync Bug - Roblox

TeleportAsync Bug.rbxl (45.8 KB)

Expected Behavior
What I expect from both options is to actually teleport the player as stated in the documentation:


TeleportOptions | Roblox Creator Documentation

Actual Behavior

For Option 1

image

it seems to bring me back to the server that I teleported from

For Option 2
image

Issue Area: Engine
Issue Type: Connectivity
Impact: Critical
Frequency: Constantly
Date First Experienced: 2022-11-19 00:11:00 (+07:00)
Date Last Experienced: 2022-11-19 00:11:00 (+07:00)

1 Like

This is intended behaviour, you cannot simply use a random GUID as a JobId, it must be a currently running server. By ‘no matching server is found’ they mean if you leave the parameter blank and the place you are attempting to teleport to has no running servers, then it will create a new server, if you use the parameter it will need that server to exist or it will fail. That’s all intended.

This is technically intended behaviour, a matching server is found (being the server you are in) and it teleports you to it, however the server shuts down during the teleport and as a result you get the ‘bug’.

As stated above there is no bug here, just poor documentation.

I doubt this is critical by any means, this never worked in the past and doesn’t break any games?

1 Like

if this is true then that’s incredibly dumb as the current behavior cause games player lost and stuns innovation, i guess i’ll make a feature request so this can be changed into a better and more useable feature

@RuizuKun_Dev Thanks for the report. Given that this is expected behavior we will probably close this out as a bug and look for a feature request.

here you go

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