TeleportFunction of TeleportService
void Teleport ( int64 placeId, Player player = nil, Variant teleportData, ScreenGui customLoadingScreen = nil )Parameters:
Description: Used to teleport a player to the place with ID placeId. The given teleportData can be any value that can be stored in a datastore, and will be transported along with the player. The customLoadingScreen is a GUI that'll be made static (scripts don't run, TweenPosition etc doesn't work, ...) and displayed during teleporting. You can see these arguments after the player has been teleported, using LocalPlayerArrivedFromTeleport.
The code below will teleport a player to Crossroads, assuming it's in a LocalScript.
The code below will teleport a player to Crossroads, from a server side Script. This assumes that there's a player named 'Telamon' present.
Tutorials Used In