[Solved] ReserveServer failing extremely often

I am using the teleport service :ReserveServer() and :TeleportToPrivateServer() to teleport players into a new place. The code is as follows:

local playerstotele = {}
	for i,v in pairs(game.Players:GetPlayers())do
		if v:FindFirstChild("PlayerData") then
			if 	v.PlayerData.CurrentLobbyData.CurrentState.Value == buttonID then           
				table.insert(playerstotele,v)	
				game.ReplicatedStorage.Events.HideExitButton:FireClient(v)
			end
		end
	end	

	local code = game:GetService("TeleportService"):ReserveServer(4745593789)
	game:GetService("TeleportService"):TeleportToPrivateServer(4745593789,code,playerstotele)

I know i need to add Pcall to this, but I am getting about a 50% success rate when publishing and playing. Some people are able to teleport fine, while the other people get error 771 (teleport failed, server is no longer available). This is happening almost every single time. Is this expected, or am I doing something wrong?

2 Likes

Got the exact same issue.
Got a lobby of max 4 players, where minimum 1 player will fail to teleport due to the 771 error.

3 Likes

“Server is no longer available”

if the reserved server stays without players for some secs it will shutdown, try adding a pcall and if it doesn’t work then wait two seconds then retry

1 Like

Hi there, not sure if this will help. But I’ve also gotten the same issue when I play solo times while joining reserved servers. Once the BindToClose() is called, I just wait(2). Not sure if that helps or not? I know after the server shuts down, it has a max yield of 30 seconds before forced shutdown.

Problem is, some of the players gets teleported?

Did you ever end up finding a solution to the issue? I’m having the same problem…

1 Like

No sadly, it still happens but it seem to have calmed down. I would estimate that only 1/50 players encounter this (based on feedback and me not experiencing it.)

1 Like

I ended up finding a solution to the 771 error code here: Teleport Error Code 771

2 Likes