Allow clients to specify UI for teleportation

As a Roblox developer, it is currently too hard to teleport players from the server while using a custom teleport GUI and it is impossible to teleport players as a group with custom teleport GUIs.


Certain teleport methods such as TeleportToPrivateServer and TeleportPartyAsync are designed to be called from the server, which of course makes sense given their nature. GUIs on the other hand are client-based and as such exist on the client, therefore it seems unusual that I would specify them on the server.

If you have experimental mode disabled, as I would imagine most games do, this problem is made significantly worse since changes to GUIs made on the client will not be replicated to the server. The solution is to send enough data to the server such that it is able to reproduce the exact same GUI that is visible to the client.

To illustrate what I am talking about, here is the process required to teleport the player from the server with a custom teleport GUI.

TeleportFlow

As you can see, the process is a lot more complex than it needs to be, and on top of the there is a fatal flaw which is not possible to overcome with the current API. If for whatever reason the GUI changes before the teleport is initialized (perhaps there’s some code which makes it responsive, or a loading symbol that fades in and out) then the version which the server has will be different from that seen by the client. This can potentially lead to a rough transition when the clients GUI is replaced with the servers GUI. Upon teleporting in the Egg Hunt 2018, this exact problem could be seen if the size of your viewport were to change between invoking a teleport and teleporting (since all teleports were handled on the server).

If we look at the case of the methods I mentioned earlier, their process looks a little bit more like this.

While TeleportToPrivateServer is complicated, it’s still entirely possible to teleport a group of players into a ReservedServer, each with their own teleport GUI, but without overcoming the issue I mentioned before. TeleportPartyAsync on the other hand fails entirely. It is impossible to use this method allowing each client to use their own loading screen, instead all players are required to use the same loading screen (which is not ideal in certain situations).

A suitable API should be added to allow a client to specify which GUI to use when teleporting. The first process would then be simplified to the following

Ideal

While the other problems mentioned for group based teleports would also be resolved.

12 Likes