GetJoinData and TeleportPartAsync question

When using :TeleportPartyAsync() and retrieving the JoinData on the server teleported too. Does the “Members” key, which holds a table of all the userids of the players who were teleported, keep the userids of players who left/disconnected mid teleport?

If playerA gets teleported but loses connection while loading the new place or something happened like that, would their userid still be sent over in the table? Or do we have to tell if they left using other methods?

I am in the process of making my own way of telling if a player has left, but I just want to know if what I am doing is necessary.

No definitive answer without testing, but I theorize the members array would remain intact with the UserId of each member of the party, even if they disconnected along the way. It seems like it would be immutable data passed alongside the player that is read from the server when they join. It probably doesn’t provide an accurate account of who made it and who failed to teleport, but instead shows an array of UserIds constructed from the Player object array passed in TeleportPartyAsync. I would run a sweep of Players:GetPlayers() in the new server and compare it to the Members array by seeing if Players:GetPlayerByUserId was found in the new server.

Sidenote: I have heard about TeleportService API latency lately so might be hard to test if it takes 6 minutes for your friend to join and 1 minute for you to join. How do you know if they really failed to Teleport or if they are still waiting? :L

1 Like

After running 5 tests with another computer and “SkoobiDoobiWoo” I can definitely say that the table still contains the Player’s UserId who left. I left at a bunch of different times, and unless the player can leave right before I call the function their UserId is sent on through to the other server. So your theory was correct!

As for the API latency, in the game I am creating a group of 15 players are selected out of a queue and sent on to start their game. So in that place, the game either starts when all the players have arrived, or wait 30 seconds and then start the game without the remaining players. Sadly it’s the classic Trolley problem. You either make all 14 players wait for the 1 player who is taking a long time to load, or you start the game for the 14 players and DC that 1 player. I may up the time waited as in a lot of games now you can wait nearly 5 minutes for all players to load in(League of legends, Rainbow, COD). But I figure with mostly kids playing, I am sure their patience is pretty low(Along with no leave punishments).

edit: I would also like to say that the game can start with less than 15 players unlike the games I listed which require 10 players for even teams.

1 Like