TeleportService:TeleportAsync() consistently results in Error Code 773

Background

About ten days ago, play testers for my game started experiencing an error while teleporting: “Error Code: 773, Attempted to teleport to a place which is restricted.” This is likely a bug within the engine itself, as other players have also reported this issue at around the same time it started happening within my game and I did not update the teleport code.

Where the bug occurs

Strangely, players only encounter this bug in the testing version of my game, which is separate from the start place: Randomly Generated Droids - Roblox Randomly Generated Droids - Roblox. This means that the issue could stem from the teleport not being the start place, although I’m unsure.

Footage demonstrating the behavior

In this footage, the player recording and experiencing the error was the only one who was not successfully teleported.

Code used for teleportation in the above footage

local function teleportPlayers(placeId, players, options)
	local success, result = pcall(function()
		return TeleportService:TeleportAsync(placeId, players, options)
	end)

	if success then
		return true
	else
		warn("Teleport failed:", result)
		return false
	end
end

local reservedServerCode = TeleportService:ReserveServer(game.PlaceId)
if #players > 0 then
	local success = false
	repeat 
		local teleportOptions = Instance.new("TeleportOptions")
		teleportOptions.ReservedServerAccessCode = reservedServerCode

		success = teleportPlayers(game.PlaceId, players, teleportOptions)
		if not success then 
			task.wait(1)
		end
	until success
end

Note that this also consistently happens in separate code that uses the same function of TeleportService.

Additional info

  • This bug only happens when more than one player is being teleported to the reserved server at once.
  • Using the TeleportService:TeleportToReservedServer() function instead also results in the same behavior.
  • This consistently happens in certain setups, with some players going through the teleport and others getting the error and being blocked from teleporting. Presumably, this is from the teleported players being in the same region, while the blocked players are not.
  • Other developers are also experiencing this bug within their own games: Error Code: 773 appears randomly when teleporting to a reserved server

Issue Area: Engine
Impact: Major
Frequency: Constantly
Date First Experienced: 2024-10-05 01:10:00

To help with determining the cause, could you add failed teleport handling to your game, as recommended here:

Something like:

local function handleFailedTeleport(player, teleportResult, errorMessage, targetPlaceId, teleportOptions)
	if teleportResult == Enum.TeleportResult.Flooded then
		print("Teleport flooded, waiting...")
		task.wait(15)
	elseif teleportResult == Enum.TeleportResult.Failure then
		print("Teleport failed, waiting...")
		task.wait(1)
	else
		-- if the teleport is invalid, log error
		error(("Invalid teleport [%s]: %s"):format(teleportResult.Name, errorMessage))
	end

	print("Teleport failed, retrying teleport for: " .. player.UserId)
	pcall(TeleportService.TeleportAsync, TeleportService, targetPlaceId, {player}, teleportOptions)
end

TeleportService.TeleportInitFailed:Connect(handleFailedTeleport)

This should give you some additional info about why the teleport is failing. Could you share the errorMessage that gets logged?

Also it will retry the failed TP, which in some cases can work around the failure.

Hi @JustEnoughIdeas , the issue you linked has been confirmed to be resolved. Can you provide the from/to placeId’s, and playerId’s involved in the issue?

Presumably, this is from the teleported players being in the same region, while the blocked players are not

Do you know which country/region the blocked players are from? thanks.

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