
Instead of adding a callback per player, add a single one and use the touched part. Player 1 now touches the object, and the object triggers all the 2 callbacks, thus for both players. For every player who joins you add a callback to the part, which executes the code for that player. It doesn't run any scripts inside of the ScreenGui.1 Answer.

The following example sets a customized ScreenGui located in ReplicatedStorage as the loading screen when a teleport happens. You can add a custom teleport screen to improve immersion for users by calling TeleportService:SetTeleportGui() on the client and pass through the ScreenGui to use before teleporting the user. When a user triggers a teleport, they see the standard Roblox loading screen as they wait for the new place to load in. To enable cross experience teleportation, open Game Settings > Security and enable Allow Third Party Teleports on Studio.

Enabling Cross Experience Teleportationįor security purposes, teleporting a user from your experience to another experience owned by others, or the other way around, fails by default. If you want to take precautions of handling errors when setting up teleportation, see Handling Failed Teleports. This limitation reduces client-side exploitation.

You can only call TeleportAsync() from server-side scripts.
