Attempted to teleport to a place that is restricted

I’m assuming this is possibly Code 773? If this is the case I know this issue has been raised on numerous occasion through the years so could likely be something messing up server sided. A concrete solution to this, from my knowledge, isn’t that clear as people have had different solutions.

You can try using TeleportAsync or manually updating your subplaces until they (suddenly?) can be teleported into - based on what I gathered from past topics.

Yes this is indeed code 773. What solutions could I possibly try?

I would definitely search through Devforum with the keyword “Error 773” as this stuff, like mentioned, has been raised a number of times. You can also try searching this on a browser as well for more information on the matter.

1 Like

Did you published the place where you want to teleport the players? And have you set it to public?

The main game is published, I didn’t know you could publish places. Where and how do I publish places?

Are you testing your game with multiple Roblox player clients? Seems to be a documented engine bug if so:

I’m not using TeleportAsync so this can’t be the case.

Open the place you want to teleport the players in, and do like you would publish a normal game on Roblox. So open “File” and select “Publish to Roblox” or “Publish to Roblox as”.

If you want to use “Publish to Roblox as” select the game you’re working on, and then select the place you want to publish as. Don’t do that with any other places than the one you want to publish, as it will overwrite all the datas of the place you’re trynna publish.

For instance, if you try to publish the place where you want to tp players at as your lobby, it’ll overwrite all your lobby data, and you’ll lose your work.

Tell me if it worked!

2 Likes

Are you still using multiple clients? The recorded bug is with TeleportAsync but it most likely extends to other methods as Roblox does not intend for multiple clients to be used at once outside of Studio.

Well for this method I’m basically converting my place to a game, and then I’ll have to enable third-party teleports as they are not in the same game universe then. I will try this method and tell you if it worked or not.

1 Like

Places that are part of a universe to my knowledge to not need to be published if they are already created?.. Thus being published by defenition. Perhaps you are referring to ensuring that a place is on the correct version?

I had the same issue when making a matchmaking system, then I published my places and it worked. So it might be the solution for him as well.

Yes, and that is still the case, as the place will react by listening to the main game. If you set the main game to private all the places that follow will be private as well.

The thing is when you made that matchmaking system I think you didn’t make a different place, I think you made a different game and then used third-party teleports to teleport the player into another one of your games.

Nope, I made different places for differents level groups.

image

and then you clicked publish as to fix the problem?

Yeah and for me it worked, I didn’t use TeleportAsync() as well.

Here’s the code:
(It was supposed to be for a comission, that’s why there are many comments)

-- Service variables --

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

-- Datastore variables

local QueueDataStore = DataStoreService:GetDataStore("QueueDataStore")
local queue = MemoryStoreService:GetSortedMap("Queue")

-- Variables --

local remotesFolder = game.ReplicatedStorage:WaitForChild("RemoteEvents")
local queueRemote = remotesFolder.Queue
local teleportingRemote = remotesFolder.Teleporting

-- replace with your places IDs

local zeroTo9 = 13181777762 
local tenTo25 = 13226909107
local twentySixTo50 = 13226909257
local fiftyOneTo99 = 13226909425
local hundredTo250 = 13274340960
local twohundred51To500 = 13274342642
local fivehundred1To750 = 13274344189
local sevenhundred51To1000 = 13274346658

-- Table to check if a player is searching or not

local playersInMatchmaking = {}

-- Matchmaking system --

-- Adding and removing player from queue --

queueRemote.OnServerEvent:Connect(function(player, inQueue)
	if playersInMatchmaking[player] then return end
	playersInMatchmaking[player] = true
	
	if inQueue == "LEAVE" then
		pcall(queue:SetAsync(player.UserId, player.UserId, 86400), player)
		
	elseif inQueue == "PLAY" then
		pcall(queue:RemoveAsync(player.UserId), player)
	end
	
	wait(1)
	playersInMatchmaking[player] = false
end)

local function onPlayerLeave(player)
	queue:RemoveAsync(player.UserId)
end

game.Players.PlayerRemoving:Connect(onPlayerLeave)

local lastOverMin = tick()

-- Teleporting players to the game --

while wait(1) do
	
	local success, queuedPlayers = pcall(function()
		return queue:GetRangeAsync(Enum.SortDirection.Descending, 2)
	end)
	
	if success then
		local amountQueued = 0
		
		for i, data in pairs(queuedPlayers) do
			amountQueued += 1
		end
		
		if amountQueued < 1 then
			lastOverMin = tick()
		end
		
		local timeInQueue = tick() - lastOverMin
		
		if amountQueued == 2 then
			for i, data in pairs(queuedPlayers) do	
				local userId = data.value
				local player = game.Players:GetPlayerByUserId(userId)
				
				if player then
					local levels = player.PlayerStats.Levels
					
					if levels.Value >= 1 or levels.Value <= 9 then
						local success, err = pcall(function()
							local ServerId = TeleportService:ReserveServer(zeroTo9)
							
							TeleportService:TeleportToPrivateServer(zeroTo9, ServerId, {playersInMatchmaking})
							teleportingRemote:FireClient(player)
						end) 
						
					elseif levels.Value >= 10 or levels.Value <= 25 then
						local success, err = pcall(function()
							local ServerId = TeleportService:ReserveServer(tenTo25)

							TeleportService:TeleportToPrivateServer(tenTo25, ServerId, {playersInMatchmaking})
							teleportingRemote:FireClient(player)
						end)
						
					elseif levels.Value >= 26 or levels.Value <= 50 then
						local success, err = pcall(function()
							local ServerId = TeleportService:ReserveServer(twentySixTo50)

							TeleportService:TeleportToPrivateServer(twentySixTo50, ServerId, {playersInMatchmaking})
							teleportingRemote:FireClient(player)
						end) 
						
					elseif levels.Value >= 51 or levels.Value <= 99 then
						local success, err = pcall(function()
							local ServerId = TeleportService:ReserveServer(fiftyOneTo99)

							TeleportService:TeleportToPrivateServer(fiftyOneTo99, ServerId, {playersInMatchmaking})
							teleportingRemote:FireClient(player)
						end) 
						
					elseif levels.Value >= 100 or levels.Value <= 250 then
						local success, err = pcall(function()
							local ServerId = TeleportService:ReserveServer(hundredTo250)

							TeleportService:TeleportToPrivateServer(hundredTo250, ServerId, {playersInMatchmaking})
							teleportingRemote:FireClient(player)
						end) 
						
					elseif levels.Value >= 251 or levels.Value <= 500 then
						local success, err = pcall(function()
							local ServerId = TeleportService:ReserveServer(twohundred51To500)

							TeleportService:TeleportToPrivateServer(twohundred51To500, ServerId, {playersInMatchmaking})
							teleportingRemote:FireClient(player)
						end) 
						
					elseif levels.Value >= 501 or levels.Value <= 750 then
						local success, err = pcall(function()
							local ServerId = TeleportService:ReserveServer(fivehundred1To750)

							TeleportService:TeleportToPrivateServer(fivehundred1To750, ServerId, {playersInMatchmaking})
							teleportingRemote:FireClient(player)
						end) 
						
					elseif levels.Value >= 751 or levels.Value <= 1000 then
						local success, err = pcall(function()
							local ServerId = TeleportService:ReserveServer(sevenhundred51To1000)

							TeleportService:TeleportToPrivateServer(sevenhundred51To1000, ServerId, {playersInMatchmaking})
							teleportingRemote:FireClient(player)
						end) 
					end
					
					
					spawn(function()
						if success then
							wait(1)
							pcall(function()
								queue:RemoveAsync(data.key)
							end)
						end
					end)
				end
			end
		end
	end
end

Ty alot I published the places and it worked.

1 Like

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