Teleport failing

I have yet to find a solution to teleportation failing extremely regularly (>1 in 10 times). I have this code in a serverscript to teleport people, and often some people get teleported while others do not.
The error code is 771- teleport failed, server is no longer available, with a client error of:

raiseTeleportInitFailedEvent: Teleport failed because This game has ended (GameEnded)

There are no server errors, and often most players are able to teleport without issue. It is not the case that everyone gets this or noone each teleport; some clients get it and some do not.

    local code = TS:ReserveServer(4745593789)
	local playerstotele = {}  --is filled with a list of players
	local succ,err = pcall(function()
	TS:TeleportToPrivateServer(4745593789,code,playerstotele)	 
	end)

Is there a way to either fix this, or at least reduce the chances of it failing?

3 Likes

did you insert the players to local playerstotele = {} variable?

Yes i just didn’t include it here for the sake of keeping it short. That is definitely not the problem

Are you still experiencing this problem?

Yes, but i have found a workaround here:
Teleport Error Code 771

The error still comes up, but it retries and teleports

I have found the solution after being directed here:

It will still error, but it retries and so it basically solves the problem

1 Like