Update TeleportService:GetPlayerInstanceAsync() API reference

Developer Hub API Reference Entry: TeleportService:GetPlayerInstanceAsync()

The documentation on the returns of this function is listed incorrectly. It only lists three return values while in reality it returns four.

  1. CurrentInstance (True if the requested player is in the requesting server.)
  2. ??? (I’ve been told this is an error message. I’ve only seen empty string returns, so I don’t know.)
  3. PlaceId (Self-explanatory.)
  4. InstanceId (The target’s server’s game.JobId)

(Sorry for the bad formatting, feel free to shoot me a reference sheet on how to make it fancy in a PM.)

4 Likes

Posting for some clarity: second argument is indeed an error message. It’s a string that’s blank if GetPlayerPlaceInstanceAsync is successful, or the reason why the fetch didn’t work if it wasn’t successful. Super redundant to include those two parameters but whatever.

Documentation reporting that only 3 values are returned is wrong. I don’t know why this change was made because it was correct before when it reported 4 return values, it just had a wrong code sample which didn’t accommodate for the fact that two success values come back if it was wrapped in a pcall.

1 Like