insert_script_lines
Insert new lines into a Roblox script at a specific position using line numbers from the script's numbered source to ensure precise placement.
Instructions
Insert new lines into a Roblox script at a specific position. IMPORTANT: Use the "numberedSource" field from get_script_source to identify the correct line numbers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| afterLine | No | Insert after this line number (0 = insert at very beginning, 1 = after first line). Get line numbers from "numberedSource". | |
| newContent | Yes | Content to insert (can be multiple lines separated by newlines) | |
| instancePath | Yes | Roblox instance path to the script (e.g., "game.ServerScriptService.MainScript") |