Hey there!
IS there any way to script for private server players to be able to teleport to private server places? My game has many place teleporters off of a main lobby, but with Private Servers, it teleports players to public mission places. Is there a way to make it teleport to private places?
This might help you.
No. You can do this with reserved servers but not private servers. There’s no teleport API that works with private servers. The one mentioned above is actually for reserved servers which need an access code; said code is provided by the ReserveServer function. Private servers do not have a code.
The only identifiable information you have to work with is the PrivateServerId but you can’t use it for teleporting, only for things like DataStores.
So, it’s not possible yet? That’s unfortunate. It would be a great feature to have. Very helpful, too. Thanks!
Correct, it’s not possible yet. It’s not impossible to work around this issue though, probably should’ve mentioned it in my first reply lol. Some developers found that you can take advantage of the identifiable information for private servers and compliment them with reserved servers.
When the server detects that the current server is a private server (PrivateServerOwnerId is non-zero and PrivateServerId is not equal to a blank string “”), use ReserveServer to create a reserved server. You will get an access code that you can use. Ideally you should use a DataStore to store the code where the PrivateServerId is the key and the code returned from ReserveServer is the value.
Using the reserved server code you have (whether you fetched it from a DataStore or created a new one because the current private server doesn’t have a code), you can teleport players into that reserved server. You’ll need to figure out your own way to transfer the PrivateServerId along with teleports so that you can later fetch the code and teleport them back into this reserved server, but yeah… that’s the general idea of it.
If my explanation was too confusing, here, a diagram I did on Google Drawings.
Essentially what you’re doing here is creating a dedicated reserved server for a private server. When a player joins a private server, they are instantly redirected to that dedicated reserved server to play in instead of using a raw private server instance. This way, you have an accessible server you can go back to, provided you keep track of this information.