What does this error mean?

Ive never seen the first error before, and this started happening randomly, I didn’t change any code. Is this a Roblox related issue? It mainly affects my teleportation, if i try teleporting to a different place from the start place it just rejoins the start place. Any help would be appreciated, thanks!

Hey! The error PlaceLaunchDeviceBlocked is not really a valid member of Enum.ConnectionError so the error your seeing happens because PlaceLaunchDeviceBlocked does NOT exist in Roblox’s current Enum.ConnectionError list cus Roblox enums change over time, and like some older tutorials or forum posts might use enum members that were removed or renamed.

You can fix it by:

  1. Replacing it with a valid member, like Enum.ConnectionError.GameFull or Enum.ConnectionError.NoError .

  2. Or handling unknown errors in a catch-all way so your script doesn’t break if the enum changes in the future.

:star: Remove PlaceLaunchDeviceBlocked from your code, because it’s not recognized by Roblox.

You can view the current list of enums in :

:link: https://create.roblox.com/docs/reference/engine/enums

Appreciate the response, I understand that this should be caused by PlaceLaunchDeviceBlocked not being a member of Enum.ConnectionError, but there is no instance of PlaceLaunchDeviceBlocked in my code.

This is why I was so confused, as I never added it to my scripts nor did I publish any changes before this error showed up.

Could you share your script if possible?

Connection isn’t a script in my game, and matchmaking is the only thing affected so I assume that what I should send.

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

local PlayRemote = RepStorage.RemoteEvents.Play

local SERVER_LIFE_SPAN = 60 * 60 * 3

local MaxPlayersPerLobby = 12
local PlaceId = 84967190650512

local AvailableGamesKey = "AvailableGames"
local AvailableGamesStore = MemoryStoreService:GetSortedMap(AvailableGamesKey)

local function GetOrCreateLobby()

	local LobbyId = nil
	local LastKey = nil

	while true do

		local Batch = AvailableGamesStore:GetRangeAsync(Enum.SortDirection.Ascending, 200, LastKey)

		if #Batch == 0 then break end

		for _, Server in ipairs(Batch) do

			local ReservedServer = nil

			pcall(function()
				
				AvailableGamesStore:UpdateAsync(Server.key, function(ExistingData)

					if ExistingData.PlayerCount < MaxPlayersPerLobby then
						
						ExistingData.PlayerCount += 1
						ReservedServer = ExistingData
						
						return ExistingData
					end
					
				end, SERVER_LIFE_SPAN)
			end)

			if ReservedServer then
				
				LobbyId = Server.key
				break
				
			end
		end

		if LobbyId then
			
			break
		end

		LastKey = Batch[#Batch].key
	end

	if not LobbyId then

		local Code, ServerID
		local Success, Error = pcall(function()
			
			Code, ServerID = TeleportService:ReserveServerAsync(PlaceId)
			
		end)

		if Success then
			
			local NewLobby = {
				
				PlayerCount = 1
				
			}

			AvailableGamesStore:SetAsync(Code, NewLobby, SERVER_LIFE_SPAN)

			LobbyId = Code
			
		else
			
			warn(Error)
		end
	end

	return LobbyId
end

local function TeleportPlayer(Player)

	task.wait(0.5)
	local LobbyId = GetOrCreateLobby()

	if LobbyId then 
		
		pcall(function()
			
			TeleportService:TeleportToPrivateServer(PlaceId, LobbyId, {Player})
			
		end)
	end
end

PlayRemote.OnServerEvent:Connect(function(Player)

	task.spawn(function()

		TeleportPlayer(Player)

	end)
end)

local SpawnService = require(game:GetService("ServerScriptService").Services.SpawnService)

Players.PlayerAdded:Connect(function(Player)
	
	SpawnService.SpawnCar(Player)
	
end)

RepStorage.RemoteEvents.Spawn.OnServerEvent:Connect(function(Player)
	
	SpawnService.SpawnCar(Player)
	
end)

Try using this script :

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

local PlayRemote = RepStorage.RemoteEvents.Play

local SERVER_LIFE_SPAN = 60 * 60 * 3
local MaxPlayersPerLobby = 12
local PlaceId = 84967190650512
local AvailableGamesKey = "AvailableGames"
local AvailableGamesStore = MemoryStoreService:GetSortedMap(AvailableGamesKey)

local function GetOrCreateLobby()
	local LobbyId = nil
	local LastKey = nil

	while true do
		local Batch = AvailableGamesStore:GetRangeAsync(Enum.SortDirection.Ascending, 200, LastKey)
		if #Batch == 0 then break end

		for _, Server in ipairs(Batch) do
			local ReservedServer = nil
			pcall(function()
				AvailableGamesStore:UpdateAsync(Server.key, function(ExistingData)
					if ExistingData.PlayerCount < MaxPlayersPerLobby then
						ExistingData.PlayerCount += 1
						ReservedServer = ExistingData
						return ExistingData
					end
				end, SERVER_LIFE_SPAN)
			end)

			if ReservedServer then
				LobbyId = Server.key
				break
			end
		end

		if LobbyId then break end
		LastKey = Batch[#Batch].key
	end

	if not LobbyId then
		local Code, ServerID
		local Success, Error = pcall(function()
			Code, ServerID = TeleportService:ReserveServerAsync(PlaceId)
		end)

		if Success then
			local NewLobby = { PlayerCount = 1 }
			AvailableGamesStore:SetAsync(Code, NewLobby, SERVER_LIFE_SPAN)
			LobbyId = Code
		else
			warn(Error)
		end
	end

	return LobbyId
end

local function TeleportPlayer(Player)
	task.wait(0.5)
	local LobbyId = GetOrCreateLobby()

	if LobbyId then
		local success, err = pcall(function()
			TeleportService:TeleportToPrivateServer(PlaceId, LobbyId, {Player})
		end)

		if not success then
			warn("Teleport failed:", err)
		end
	end
end

PlayRemote.OnServerEvent:Connect(function(Player)
	task.spawn(function()
		TeleportPlayer(Player)
	end)
end)

local SpawnService = require(game:GetService("ServerScriptService").Services.SpawnService)

Players.PlayerAdded:Connect(function(Player)
	SpawnService.SpawnCar(Player)
end)

RepStorage.RemoteEvents.Spawn.OnServerEvent:Connect(function(Player)
	SpawnService.SpawnCar(Player)
end)

Hey, turns out one of our devs actually published the first place to the one we were trying to teleport too so it was throwing an error because of that, but I appreciate your help.

Oh alright! Glad you fixed it :smiley:

1 Like