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?