set_script_source
Replace the entire source code of a Roblox script at a given instance path. Works with open editors; use line editing tools for partial updates.
Instructions
Replace the entire source code of a Roblox script. Uses ScriptEditorService:UpdateSourceAsync (works with open editors). For partial edits, prefer edit_script_lines, insert_script_lines, or delete_script_lines.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | New source code for the script | |
| instancePath | Yes | Roblox instance path to the script (e.g., "game.ServerScriptService.MainScript") |