Can you help me with this? "An attempt was made to teleport to a place that is restricted. (Error code: 773)" (The game is public)

Can anyone help me with the script? The teleport is fine, it’s a teleport to another world in the same universe, everything is fine, but when I tried it and it led me to this “I tried to teleport to a place that is restricted” and I have permissions turned on. I can’t find the error

To explain better, it is a story game. I need you to get on a bus and wait to teleport to another world to start playing. I’m looking for a reserved servers so that anyone can’t join because it’s busy until they finish the game.

  1. I want them to be able to teleport you to another world in the same universe

  2. I’m sorry that there are strange texts in the photos, because the originals are in Spanish, I had to translate so you can understand it.

permissions activated

Places
image

Error

  1. I searched for all the solutions and included them on this page, it never solved the problem, my girlfriend also got the same error when creating a new world and following the same steps as any YouTube video and she got the same error as me

Here is the code just in case

local TeleportService = game:GetService("TeleportService")

while true do
	for i = 15, 0, -1 do
		script.Parent.Parent.Sign.Top.SurfaceGui.TextLabel.Text = "Leaving in " .. i .. " seconds"
		wait(1)
	end

	-- Move truck

	-- Reserve server

	local players = {}

	for i, v in pairs(script.Parent.Seats:GetChildren()) do
		if v.Occupant then
			print("Occupant found. " .. v.Parent.Name)
			table.insert(players, game.Players:GetPlayerFromCharacter(v.Occupant.Parent))
		end
	end

	if #players > 0 then
		for i = 0, 150, 1 do -- Change 30 to the number of studs
			script.Parent:TranslateBy(script.Parent.Hitbox.CFrame.lookVector)
			wait(0.01)
		end

		local serverData = TeleportService:ReserveServer(15863585576)
		local placeId = 15863585576 -- Cambia esto al PlaceId correcto

		TeleportService:TeleportToPrivateServer(placeId, serverData, players)

		for i = 0, 150, 1 do -- Change 30 to the number of studs
			script.Parent:TranslateBy(-script.Parent.Hitbox.CFrame.lookVector)
			wait(0.01)
		end
	end
end

I’m not asking you to write the code or anything like that, the only thing I’m asking is that you help me with the error in order to solve the error I’ve had since yesterday.

5 Likes

Why are the texts in the screenshots edited


image

3 Likes

There is a response to my post, that’s why.
Please read everything before commenting, thank you :smiley:

3 Likes

It worked for me thanks to a programmer. What you have to do is go to your place, which you are going to create, and teleport to that place. Once there, simply log in and click ‘Publish’. With that, it should now be working. It served me perfectly, it was just a small mistake I made, but you learn from mistakes.

1 Like

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