Unexplainable Errors using :TeleportAsync() making a Place Roulette Game

Hello everyone,

I am making a Place Roulette game, and attempting to teleport to these random places using :TeleportAsync causes very consistent errors for the majority of the time.

These errors are quite vague. I have been searching on the Devforum for any solutions, but to no avail. The official documentation doesnt list these errors and their meaning, either:

Errors in Multiplayer sessions:

  • A specified Member cannot join the Destination Place.
  • The Source Place and the Destination Place are not in the same Universe.

Errors in Singleplayer sessions:

  • 773: Teleport validation failed
  • 773: Game’s root place is not active.

My code is quite simple:

local TeleportService = game:GetService("TeleportService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local PlaceChecker = require("@self/PlaceChecker")

local Teleport = ReplicatedStorage:WaitForChild("Teleport")
local IsTeleporting = ReplicatedStorage:WaitForChild("IsTeleporting")

local placeQueue = {}

local function ChooseRandomPlace()
	local placeId : number = nil
	local isPlaceValid = false

	repeat		
		local digits = {} 
		
		for i = 1, 10 do
			table.insert(digits, math.random(0, 9))
		end
		
		placeId = table.concat(digits)
		
		local placeInformation = PlaceChecker:FetchPlaceInfo(placeId)
		if placeInformation.isPlace then 
			isPlaceValid = true
			print(`PLACE SUCCESSFULLY FOUND. PLACEID: {placeId}, NAME: {placeInformation.name}`)
		end
		
	until isPlaceValid

	return placeId
end

local function StartRoulette()
	IsTeleporting.Value = true

	local placeId = ChooseRandomPlace()
	
	if placeId then
		local success, errorMsg = pcall(function()
			TeleportService:TeleportAsync(placeId, Players:GetPlayers())
		end)

		if not success then
			warn(`ERROR OCCURED: '{errorMsg}'`)
		end
	end

	task.wait(0.1)
	IsTeleporting.Value = false
end

Teleport.Event:Connect(StartRoulette)

How can these errors be fixed? Thank you in advance.

Under game settings->security do you have ‘Enable third Party Teleports’ enabled

  • The Source Place and the Destination Place are not in the same Universe.

  • This can happen because the Destination Place isn’t created in the Game you want to teleport the player to.

  • 773: Game’s root place is not active.

  • You might wanna check if the Main Game/Lobby is published or republish it again.

  • A specified Member cannot join the Destination Place.

  • Have you filled the questionnaire for your experience?

How can I prevent this?

Could you elaborate on this? I’ve been publishing updates on a consistent basis, the game is public, as well.

Yes, I have. I did it again just to see if that’d fix it, but this error still occurs.

Yeah of course. In the early stages of the project, it wouldn’t let me teleport to any places at all without that enabled.

Go to Asset Manager > Places then right click then press “Add New Place”,
Then right click the Place you just made then press “Copy ID to Cilpboard”

Hmm, is the destination place also public and published?, That could be a problem?
Also i’d advise using the Safe Teleport Module by Roblox, It’s located in the “Handle Failed Teleports” Section.

Go to your Place in create.roblox.com > Audience > Access Settings and make sure “Allow direct access to places” is enabled, or the Safe Teleport Module could fix that.

Uh.. What am I supposed to do with this ID?..

The other suggestions did not fix my issue. The Safe Teleport Module just repeated the error 5 times in a row, technically, and I also already had Allow direct access to places already on, seemed to be automatic.

Sorry, you have to replace the old place id with the id that you copied

This didn’t seem to work, but correct me I did the process incorrect:

  1. Created a new side place. (Asset Manager > Places > Add New Place)
  2. Copied the place’s ID to my Clipboard
  3. Applied the new ID to the starting place with the method game:SetPlaceId()
  4. Removed the Side Place
  5. Published the game

These errors still occur. I did this in a duplicate version of my current game just for safety reasons, but everything is identical, age rating and settings included.

What is applying a new PlaceId achieving exactly? If the Destination Place isn’t created, isn’t that a problem on the developers end, not mine? That would probably mean I need to get it’s isPlayable value via HttpService.

Thank you for helping me out here.

Update:

It appears that a lot of these errors stem from the place being unavailable, private, or content deleted.

The error The Source Place and the Destination Place are not in the same Universe. Seems to occur when the PlaceId generated is the PlaceId of a side place, not the main game.

With that said, I have a few ideas on how to fix these:

  • Using HttpService to check the availability of a place
  • Checking if the game is a side place, and possibly switching the PlaceId to the starting place, if this is possible.

I won’t mark this as a solution just yet, as I’ll still have to look into good fixes for these issues. Preferably, I’d like to wait on Roblox for opening up some endpoints needed for getting this info, but I’ll still see if I can make a Proxy if takes a while.