Teleport Error 773: Attempt to teleport to restricted place

The main issue



As showcased above, whenever I press the ‘New Game’ button, the error pops up. I have turned on and off Third part teleports, I’ve tried TeleportAsync, Teleport and ReserveServer+TeleportToPrivateServer and have had no successful result.

Code


Server-side data script

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

local PlayerQuerys = DataStoreService:GetDataStore("PlayerQuerys")

local Utils = game.ReplicatedStorage:WaitForChild("Utils")
local Client = Utils:WaitForChild("Client")

local QueryRequests = game.ReplicatedStorage:WaitForChild("QueryRequests")
local CharacterUtils = require(Client:WaitForChild("CharacterUtils"))

Players.PlayerAdded:Connect(function(Player)
	local CharacterDataQuery = CharacterUtils:CharacterDataQueryTemplate()
	local RetrievedQuery
	
	local Success, FailureReason = pcall(function()
		RetrievedQuery = PlayerQuerys:GetAsync(Player.UserId.. "--query")
	end)
	
	if (FailureReason) then
		warn("Failure in loading data\n<".. FailureReason.. ">")
		Player:Kick("There was a failure in data load, please rejoin and try again.")
	end
	
	print("CharacterDataQuerys Loaded")
	if (RetrievedQuery) then
		-- Load in Data
		print("CharacterDataQueryEvaluation: no new player lol")
	else
		-- Create new Data
		print("CharacterDataQueryEvaluation: new player")
		QueryRequests:WaitForChild("NewDataInit"):FireClient(Player, game:GetService("TeleportService"):ReserveServer(11415291695))
	end
end)

QueryRequests:WaitForChild("NewDataInit").OnServerEvent:Connect(function(Player, PrivateServerCode)
	TeleportService:TeleportToPrivateServer(11415291695, PrivateServerCode, {Player})
end)

Client-side data script

-- my worst nightmare

local TeleportService = game:GetService("TeleportService")

local QueryRequests = game.ReplicatedStorage:WaitForChild("QueryRequests")
local NewDataQuery = QueryRequests:WaitForChild("NewDataInit")

local LoadGui = script.Parent

NewDataQuery.OnClientEvent:Connect(function(PrivateServerCode)
	script.Parent.Parent:WaitForChild("NewGameUI").Enabled = true
	script.Parent.Parent:WaitForChild("NewGameUI"):WaitForChild("NewGameBttn").MouseButton1Click:Wait()
	game:GetService("TweenService"):Create(LoadGui:WaitForChild("TopFrame"), TweenInfo.new(1), {Size = UDim2.new(1, 0, 0, 185), BorderSizePixel = 100}):Play()
	game:GetService("TweenService"):Create(LoadGui:WaitForChild("BottomFrame"), TweenInfo.new(1), {Size = UDim2.new(1, 0, 0, 385), BorderSizePixel = 100}):Play()
	TeleportService:SetTeleportGui(LoadGui)
	NewDataQuery:FireServer(PrivateServerCode)
end)

Have you tried to set the place you are trying to go into public? If so, I have no idea.

Make sure that the place you are trying to teleport to is published.

1 Like

Unfortunately, yes it is public.

Yes, the game is fully published as well as the place inside of the game.

I managed to fix it on my own, by updating the game continously in it’s current state until eventually the overwrite made it work.

No code required :slight_smile:

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