How to Make a Teleporter with a Script
Build your own teleporter with a Trigger and one Set command: step into the trigger zone and appear at the exact spot you choose.
Introduction
A teleporter moves a player from one spot to another the moment they step into it. This tutorial builds one with a Trigger and a single Set command, no Teleport mechanism needed. When a player walks into the trigger zone, the script sets their position to the exact spot you choose. The build takes a few minutes and uses only one script with one command. It also shows why the script version is worth knowing. Unlike the built in Teleport mechanism, you can move the trigger anywhere later and the landing spot stays exactly where you put it.
What You Need
A world open in the editor. A Trigger from the Device menu. A marker object to mark the landing spot. Use a purple box as the marker, or choose any object that is easy to spot. One script with one Set command, added in the steps below.
Steps
1. Add a Trigger where players should step in. Open the Device menu, add a Trigger , and drag it to the entry point. The trigger zone is the invisible area that fires the script, so place it where a player naturally walks. The Trigger placed in the world where players walk in image-46d10960-edited.webp The Trigger placed where players walk in. caption 2. Choose the landing spot and read its Position. Place a marker object where players should appear, select it, and open Properties. Under Group, open Transform and read the Position values. In this build the marker sits at X 27.00, Y 0.00, Z 0.00. The marker is scaled to 0.30. Note these numbers down, because you will type them into the Set command in step 7. The destination marker Position under Group and Transform image-38975966.webp The marker Position under Group, then Transform. The marker Position X 27.00, Y 0.00, Z 0.00 under Group and Transform image-3b8f71ae-edited.webp The Position values under Group and Transform. 3. Open the trigger script. Select the Trigger, tap Properties, and scroll to On Trigger Enter . Tap the + next to Scripts, then tap Edit to open the script editor. The Trigger Properties with On Trigger Enter and the Scripts row image-03eb1fc2.webp Find On Trigger Enter in the Trigger Properties. 4. Add the Set command. In the script editor, open the Command tab and tap Set . The command appears under On Trigger Enter with empty slots. The Command tab with the Set command image-4dd105f5-edited.webp Pick Set from the Command tab. 5. Point Set at the player who entered. Drag the Object pill from the On Trigger Enter header into the first slot of the Set command. That pill is the object that stepped into the trigger, usually the player. The script editor with the Object pill in the On Trigger Enter header image-57d3c538.webp Drag the Object pill into the Set command. 6. Choose what to set. Tap the Property slot, open Group, and pick Position. Three number boxes appear for X, Y, and Z. The Set command with Object and Group.Position image-c66a177a.webp Set now targets the Object Group.Position. 7. Type the landing spot numbers. Type the Position values you read in step 2 into the X, Y, and Z boxes. Use X 27, Y 0, Z 0. The Set command with the destination numbers typed in image-c736684b.webp The finished Set command. 8. Compare it with the built in Teleport mechanism. The Teleport mechanism does the same job with no script: place it and set its landing spot. It is the faster choice when you only need a simple teleporter. The world with the script trigger and the Teleport mechanism side by side image-1c45cae6-edited.webp The script trigger next to the built in Teleport mechanism. 9. Know the trade off. If you move the Teleport mechanism, its landing spot moves with it, so you must set the spot again. Move the mechanism in the editor to see how its landing spot moves with it. The Teleport mechanism being moved in the editor image-d3711782.webp Moving the mechanism moves its landing spot too.
Which one should you use?
The built-in Teleporter is the simplest option. You only place the pads and move them where you want. No script, no coordinates to type, and almost nothing that can go wrong. Use the script version when you need more control. With a script you can teleport a player to exact coordinates without placing a destination pad, and you can add conditions to the event later. The trade-off is more steps and more room for mistakes, such as typing the wrong numbers. In short: Teleporter mechanism: no script, fast to set up, and a visual link between entrance and destination. Its destination must be a pad placed in the world. Script teleporter: exact coordinates and easy to extend, but more steps and a higher chance of typing errors.
Tip
Read the numbers from the marker instead of guessing them. A small error still lands the player nearby, but the exact numbers put them right on the spot. If a number box will not take a decimal point, check the phone language. If a number box will not accept a decimal point, enter the value as a fraction instead, for example 21/100 for 0.21. The landing spot is a fixed set of numbers, not an object. Move the Trigger anywhere and the player still lands in the same place, which is the main advantage over the built in Teleport mechanism. The same script can grow. Because the landing spot is just three numbers in a Set command, you can replace them with a random value later and turn this into a random teleporter.