Step 2 – Create the TrapScript

Adding a New Script

  1. Select your Red Part.
  2. Open the View tab.
  3. Click the Explorer Button on the far left.
  4. In the Explorer Window on your right, look for the Red Part (should be highlighted blue if you already have it selected in your World Editor).
  5. Hover your mouse over the Red Part and right-click.
  6. Select Rename from the pop-up menu.
  7. Rename this part Trap.
  8. Hover your mouse over the Trap again and click the white Plus button.
  9. Add a Script.
  10. Delete any code in the script.

We will begin coding on line 1.