In this tutorial we will create a script that teleports players to a configurable location. The script detects players entering an area of the island with a Trigger Behavior and uses the TeleportPlayer Method Node to teleport them.

Completed teleporter script

Teleporter script state diagram
<aside> đź’ˇ
The script created in this tutorial can be found in game under the scripting examples view.
</aside>
To begin we create a new script and name it “Teleporter”. This gives us a place to start scripting and an object that can be placed in the world.