set_script_source
Update script source code safely in Roblox Studio without using loadstring. Input the script instance path and the new source code to modify scripts directly in the Studio environment.
Instructions
Safely set the source code of a script object without using loadstring (Studio only)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"instancePath": "<instancePath>",
"source": "<source>"
},
"name": "set_script_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instancePath | Yes | Path to the script instance (e.g., "game.ServerScriptService.MainScript") | |
| source | Yes | New source code for the script |