THE SHORT ANSWER
Roblox scripts use the Luau programming language. Script Sync lets you edit them in an external editor such as VS Code by synchronizing scripts in Studio’s data model with text files on your local disk. Changes to synchronized Luau files are applied in Studio, while Studio-side changes are written back to disk.
- Roblox scripts use the Luau programming language.
- Script Sync supports editing Roblox scripts in an external editor such as VS Code by synchronizing scripts in Studio’s data model with local text files in both directions.
- The documented folder setup procedure is to select folders in Studio’s Explorer, choose Script Sync → Sync with Directory, select a local directory, reveal it through Studio, and open it in an external editor.
- Roblox recommends folder synchronization because it automatically includes supported child folders and scripts and supports creating, renaming, moving, and deleting synchronized child items.
- Script Sync supports Script, LocalScript, ModuleScript, and Folder instances and ignores other instance types within a synchronized folder.
- Script Sync ignores script attributes and tags, which Roblox warns can cause data loss when scripts are created or deleted or when synchronization begins with older files from disk.
- If synchronized files or folders change while Studio is closed, Studio requests conflict resolution when the place is reopened.
- An external development environment cannot control the Roblox Studio debugger, so Studio is required for Studio-based debugging.
How to Sync Roblox Studio Scripts with VS Code
Roblox scripts use the Luau programming language. Script Sync lets you edit them in an external editor such as VS Code by synchronizing scripts in Studio’s data model with text files on your local disk. Changes to synchronized Luau files are applied in Studio, while Studio-side changes are written back to disk.
Set up Script Sync
- In Studio’s Explorer, select one or more folders containing the scripts you want to synchronize.
- Right-click the selection and choose Script Sync → Sync with Directory.
- Choose or create a local directory, then click Save.
- Right-click the Studio folder again and choose Script Sync → Reveal in Explorer on Windows or Reveal in Finder on macOS.
- Open the revealed directory in VS Code.
Roblox recommends synchronizing folders instead of individual scripts. Folder synchronization automatically includes supported child folders and scripts. You can also create, rename, move, or delete synchronized child items through the corresponding Studio and disk structures.
Understand the limitations
Script Sync supports Script, LocalScript, ModuleScript, and Folder instances. It ignores other instance types within a synchronized folder.
It also ignores attributes and tags on scripts. Roblox warns that this can cause data loss when scripts are created or deleted, or when synchronization begins with older files from disk.
If synchronized files or folders change while Studio is closed, Studio asks you to resolve the differences when you reopen the place. Review that prompt carefully before proceeding.
An external development environment cannot control the Roblox Studio debugger, so Studio remains necessary for Studio-based debugging.
For more creator walkthroughs, continue with practical Roblox help on Roblox How.