Skip to content

Getting Started

You can write SLua scripts in the script editor in the viewer.

If you want to use an external editor, then you can use VS Code with the Second Life External Scripting extension.

  • VSCodium is an alternative to VS Code if you prefer.
  1. Create a new workspace folder for your Second Life scripts
  2. Open the folder in VS Code
  3. Now back to your Second Life viewer, configure the External Script Editor setting in your preferences → Advanced → Script Development so that it opens up VS Code
    • On Windows this might look something like:
      "C:\Program Files\Microsoft VS Code\Code.exe" "%s"
  4. Right-click on an object in Second Life
  5. Select “Edit” → “Scripts”
  6. Click “New Script” or “Edit” on existing script
  7. Rename the script and create an equivalent file in your VS Code workspace but with the .luau extension
  8. Click Edit… on the script editor window - VS Code will automatically open, showing a temporary file for moment but then switching over to the equivalent file as the master script
  9. Edit in VS Code with full preprocessing support
  10. Save to sync changes back to the viewer