TeleportAsync does not work - Says place is restricted when it isn't

Hey there!

First off, I’m already aware that based on the title there are other posts very similar to this one. I would like to make it clear that I have checked them out already and none of them have been able to help me.

I have a game with a starter place and another place. In the starter place is a GUI with a local script like below:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Teleport = ReplicatedStorage:WaitForChild("Teleport")

script.Parent.MouseButton1Up:Connect(function()
	Teleport:FireServer()
end)

And then in ServerScriptService:

local TeleportService = game:GetService("TeleportService")
local id = 10367103270

local ReplicatedStorage = game:GetService("ReplicatedStorage")
ReplicatedStorage:WaitForChild("Teleport").OnServerEvent:Connect(function(player)
	local teleportOptions = Instance.new("TeleportOptions")
	teleportOptions.ShouldReserveServer = true
	TeleportService:TeleportAsync(id, {player}, teleportOptions)
end)

But when I actually click the button, this happens:

Now, again, I’ve looked at the other posts and have tried everything they recommended. I have…

  1. Checked to make sure the game is public (it is)
  2. Turned on third party teleports (although this doesn’t matter because I’m not trying to teleport to another game, simply another place within the game)
  3. Checked to make sure my place ID is correct (I got it from the URL on the Roblox site)

Is there anything else I could try? This problem has been stumping me for hours. Thanks!

Hey! As I said in the post in #2 I did turn this on :slightly_smiling_face:

Also, that post in particular you linked me to, I have already looked through that and found nothing that could help. That’s the only reason I’m here :sweat_smile:


Just another case of useless error messages. Make sure the destination place is published, not just saved.

5 Likes

That worked! Thank you so much!

It’s really weird the way it’s set up, I thought all I had to do was click “Publish” on the destination file but apparently you have to manually Publish As and set it to the place within the game. Really odd. Thanks again!

it is published but it still happens to me