How to Edit Roblox Scripts in VS Code Using Script Sync
Posted: Wed Jul 22, 2026 1:34 pm
How to Edit Roblox Scripts in VS Code Using Script Sync
Roblox Studio’s Script Sync synchronizes scripts with Luau files on your local disk. Changes made on disk are applied in Studio and vice versa, letting you edit code in VS Code without making Rojo your project workflow.
Script Sync is a good fit when Studio remains your main project environment and you want an external editor or code version control. Roblox recommends a third-party workflow such as Rojo when the filesystem must represent the entire project or serve as its source of truth.
Set up Script Sync
Verify synchronization
Edit and save a synchronized Luau file in VS Code. Script Sync applies the change to the corresponding Studio script. Changes made to that script in Studio are likewise written to disk.
For synchronized instances with children, Script Sync synchronizes create, rename, move, and delete operations involving supported children. If Studio and the files on disk differ when synchronization starts or resumes, Studio displays a resolution dialog listing proposed additions, modifications, and deletions before you choose Keep Studio or Keep Disk.
Install Luau language support
Roblox recommends the Luau Language Server for VS Code. It supports diagnostics, autocompletion, hover information, signature help, definition navigation, reference searches, document symbols, rename operations, semantic tokens, inlay hints, code actions, workspace symbols, folding ranges, and call hierarchies.
Roblox also recommends installing the extension’s companion Studio plugin. The plugin provides DataModel hierarchy information needed for language features to work correctly with Script Sync. The companion-plugin link is available in the official Script Sync documentation.
Supported instances and filenames
Script Sync manages these Studio instance types:
Documented filename conventions include name.luau for a ModuleScript, name.server.luau for a Script with a Server run context, name.client.luau for a Script with a Client run context, name.local.luau for a LocalScript, and directories for Folder instances.
Limitations and precautions
Script Sync ignores attributes and tags attached to scripts. Roblox advises against synchronizing scripts that use this metadata because creating or deleting scripts, or starting synchronization with older disk files, can cause data loss.
Script names must be compatible with the local filesystem. Duplicate names and unsupported characters cause Studio to report an error that must be resolved before synchronization resumes.
Script Sync cannot control the Roblox Studio debugger from an external development environment.
Script Sync works with Team Create, but Roblox advises against having multiple collaborators synchronize and edit the same script simultaneously because they can overwrite one another’s changes.
Choosing between Script Sync and Rojo
Use Script Sync when Studio should remain responsible for the project and you primarily want external code editing or code version control. Consider Rojo or another file-based workflow when the filesystem must represent more than code or act as the source of truth for the complete project.
Roblox Studio’s Script Sync synchronizes scripts with Luau files on your local disk. Changes made on disk are applied in Studio and vice versa, letting you edit code in VS Code without making Rojo your project workflow.
Script Sync is a good fit when Studio remains your main project environment and you want an external editor or code version control. Roblox recommends a third-party workflow such as Rojo when the filesystem must represent the entire project or serve as its source of truth.
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 Sync to….
- Select or create a directory on your computer, 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.
Verify synchronization
Edit and save a synchronized Luau file in VS Code. Script Sync applies the change to the corresponding Studio script. Changes made to that script in Studio are likewise written to disk.
For synchronized instances with children, Script Sync synchronizes create, rename, move, and delete operations involving supported children. If Studio and the files on disk differ when synchronization starts or resumes, Studio displays a resolution dialog listing proposed additions, modifications, and deletions before you choose Keep Studio or Keep Disk.
Install Luau language support
Roblox recommends the Luau Language Server for VS Code. It supports diagnostics, autocompletion, hover information, signature help, definition navigation, reference searches, document symbols, rename operations, semantic tokens, inlay hints, code actions, workspace symbols, folding ranges, and call hierarchies.
Roblox also recommends installing the extension’s companion Studio plugin. The plugin provides DataModel hierarchy information needed for language features to work correctly with Script Sync. The companion-plugin link is available in the official Script Sync documentation.
Supported instances and filenames
Script Sync manages these Studio instance types:
- Script
- LocalScript
- ModuleScript
- Folder
Documented filename conventions include name.luau for a ModuleScript, name.server.luau for a Script with a Server run context, name.client.luau for a Script with a Client run context, name.local.luau for a LocalScript, and directories for Folder instances.
Limitations and precautions
Script Sync ignores attributes and tags attached to scripts. Roblox advises against synchronizing scripts that use this metadata because creating or deleting scripts, or starting synchronization with older disk files, can cause data loss.
Script names must be compatible with the local filesystem. Duplicate names and unsupported characters cause Studio to report an error that must be resolved before synchronization resumes.
Script Sync cannot control the Roblox Studio debugger from an external development environment.
Script Sync works with Team Create, but Roblox advises against having multiple collaborators synchronize and edit the same script simultaneously because they can overwrite one another’s changes.
Choosing between Script Sync and Rojo
Use Script Sync when Studio should remain responsible for the project and you primarily want external code editing or code version control. Consider Rojo or another file-based workflow when the filesystem must represent more than code or act as the source of truth for the complete project.