As the title suggests, I’ve been getting a lot of issues while attempting to use the Roblox TeleportService
with ReservedServers
. For those that don’t know, the error code 771 means that a non-existent server is trying to be reached. After recently releasing my game, I have gotten numerous reports about 771 errors. It appears to happen randomly, to individuals, maybe as much as 30%-40% of the time they attempt to teleport to a reserved server.
I’ve already looked at all the places I’m teleporting players to. They all have access open to everyone, they are the correct player count, there is nothing wrong with them. The weird part is that when teleporting a group of players, some players will teleport just fine while others will get the error. I don’t think wrapping it in a pcall would help as I’m pretty sure it takes the player out of the start place and cancels their connection to the server, then gives them the error, so there would be no way to retry.
If anyone has any sort of experience or advice with this it would be much appreciated. I’ve put down some relevant code below.
local reservedServer = TeleportService:ReserveServer(level.id)
for i,v in pairs(players) do
local plrChar
teleportData.players[v.Name] = {}
teleportData.players[v.Name].data, plrChar = PlayerData.getPlayerData(v)
teleportData.players[v.Name].character = plrChar
coroutine.resume(coroutine.create(function()
giveEffect(v)
setLoadScreen:FireClient(v, level.level)
done = true
end))
end
teleportData.serverKey = reservedServer
repeat wait() until done
local loadScreen = game.ReplicatedStorage.Storage.LevelLoadScreen:Clone()
loadScreen.Frame.Destination.Text = "- "..level.level.." -"
loadScreen.Frame.DestinationShadow.Text = "- "..level.level.." -"
loadScreen.Frame.ImageTransparency = 0
loadScreen.Frame.ViewportFrame:Destroy()
for i,v in pairs(players) do
PlayerData.removePlayer(v.Name)
end
teleportData = GameAnalytics:addGameAnalyticsTeleportData(playerIds, teleportData)
if level.level ~= "PvP" then
print(level.id, reservedServer, players)
TeleportService:TeleportToPrivateServer(level.id, reservedServer, players, "SpawnPart", teleportData, loadScreen)
else
TeleportService:TeleportPartyAsync(level.id, players, teleportData, loadScreen)
end