get_script_source
Retrieve Roblox script source code with optional line numbering. Specify start and end lines to read large scripts in sections for accurate editing.
Instructions
Get the source code of a Roblox script (LocalScript, Script, or ModuleScript). Returns both "source" (raw code) and "numberedSource" (with line numbers prefixed like "1: code"). Use numberedSource to accurately identify line numbers for editing. For large scripts (>1500 lines), use startLine/endLine to read specific sections.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endLine | No | Optional: End line number (inclusive). Use for reading specific sections of large scripts. | |
| startLine | No | Optional: Start line number (1-indexed). Use for reading specific sections of large scripts. | |
| instancePath | Yes | Roblox instance path to the script using dot notation (e.g., "game.ServerScriptService.MainScript", "game.StarterPlayer.StarterPlayerScripts.LocalScript") |