Skip to content

Creating and Editing Scripts

You can create and manage your scripts using the Scripts Panel, located in the Left Sidebar.

Scripts Panel

Creating a Script

To create a new script, follow these steps:

  1. Click on the Create button in the Scripts Panel. This will generate an empty script file for you to start working on.
  2. Alternatively, if you want to reuse some lines of code from an existing script, select the script you wish to duplicate and use the Duplicate option from the context menu. This allows you to build upon existing code without starting from scratch.

All scripts are stored in the shared files folder located at: /shared/scripts/.

Editing a Script

Foxel does not include a built-in script editor, so you will need to use an external editor. To edit a script, simply double-click on it in the Scripts Panel. This action will open the script in the default editor assigned to .lua files on your system.

If you prefer to use a dedicated editor for your scripting tasks, you can set this up in the Preferences. If you have configured a dedicated editor, it will be opened when you double-click to edit the script.

Preferences Window

Tip

If you are looking for a free Lua editor, Foxel recommends Notepad++, a versatile text editor that supports Lua syntax highlighting and is widely used for scripting.