Run Lua in Roblox
execute_luaRun Lua code inside a connected Roblox executor and get back serialized return values or error tracebacks. Optionally capture console logs and script errors produced during the run.
Instructions
Run Lua code inside the connected Roblox executor. Returns the serialized return values, or the error with a traceback. Set capture_logs to also get the console lines and script errors that appeared while it ran. Use timeout_ms for code that takes long. The code runs with the executor's full permissions, so only run code the user asked for. Requires the connected state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Lua source code to run. Use 'return' to get a value back. | |
| client | No | Client id from list_clients, for example c2. Defaults to the client that connected last. | |
| wait_ms | No | With capture_logs: how long to keep collecting after the code finished (default 500). | |
| timeout_ms | No | How long to wait for the code to finish (default 15000). | |
| capture_logs | No | Also return the console lines and script errors produced during the run (default false). |