I’ve been trying to figure out this same question as well.
I’m working on a new game, and part of it features a lobby with a server list. In order for the server list to update, the servers themselves need to know what their own access code is. After some testing, I can guarantee this:
- There are no DataModel/Workspace properties that reflect the AccessCode. The JobID is completely different, and the VIPServerID is also different (although, it does exist).
My current solution is to send the AccessCode with the “teleportData” argument in TeleportService. When a client joins the server, it immediately sends the Code to the server. The server then tries to retrieve data from the serverlist data store with that access code. If successful, it blocks off all future communication on that remote. Otherwise, the server stalls until it retrieves an actual access code.
Pros: You can actually get the access code in the server, and it can be semi-protected (can only be a reserved server code)
Cons: Not 100% protected - a player might somehow figure out the code for a different reserved server and trick their own server into acting as that, which would mess up the entire system.
Moral of story? We need a 100% server-sided “PlayerArrivedFromTeleport” event that includes a teleportData parameter.