Teleporting players causes error 273: Same account launched experience from different device

I was testing my game, and when the lobby reached the max of 24 players and they teleported, everyone received error 273. I’m not sure why this is happening because earlier, when we tested with 19 players, everything worked normally.

We tried the game 3–5 times with 24 players, and the message appeared for all players every time. Am I doing something wrong? I’m wondering if the players are teleporting too quickly for Roblox to process. If that’s the case, is there a way to fix it?

Note: this is my first time making anything with OOP so it may be that I am doing something wrong? I’m not sure?

CODE:

function QueueManager:TeleportPlayers()

	if self.countdownConnection then
		self.countdownConnection:Disconnect()
		self.countdownConnection = nil
	end

	self.countdownValue.Value = -1
	self.isCountdownActive = false

	local playersToTeleport = {}
	for i = 1, #self.queue do
		playersToTeleport[i] = self.queue[i]
	end


	self.queue = {}
	self.queueLookup = {}


	self.playersDisplay.Text = "0" .. SLASH .. CONFIG.MAX_PLAYERS

	self.timerDisplay.TextColor3 = Color3.new(1, 1, 1)
	self.playersDisplay.TextColor3 = Color3.new(1, 1, 1)
	LobbyReset(false)

	local teleportOptions = Instance.new("TeleportOptions")
	teleportOptions.ShouldReserveServer = true

	local success, errorMsg = pcall(function()
		TeleportService:TeleportAsync(CONFIG.GAME_PLACE_ID, playersToTeleport, teleportOptions)
	end)

	if not success then
		warn("Teleport failed: " .. tostring(errorMsg))
		local teleportFailed = ReplicatedStorage.QueueRemotes.TeleportFailed

		for i = 1, #playersToTeleport do
			local player = playersToTeleport[i]
			if player and player.Parent then 
				teleportFailed:FireClient(player, errorMsg)
				if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
					player.Character.HumanoidRootPart.CFrame = workspace.Lobby.TeleportParts.TeleportFailed.CFrame
				end
			end
		end
	end

	self:UpdateDisplays()
end
1 Like

Does your game have any code that runs on game:BindToClose()? Maybe when all players leave at once it gets triggered (since the server tries to shut down), but because the call keeps the server alive for a maximum of 30 seconds more if it’s doing something(for example writing to a datastore), maybe Roblox thinks players are still in the original server? Causing that error to appear?

2 Likes

Yes I do have BindToClose (inside the module from profileservice)! Is there a way to avoid this issue?

I’m not certain that this is the issue you’re facing, I just suggested it. You should test it out to rule out any other causes.

However, if that’s the issue, you can avoid it by creating a special case for the mass teleporting event. Where you handle data related issues manually before teleporting the players in that function, instead of BindToClose(), and somehow disable that behavior temporarily while teleporting the players.