Compiles and runs a string of Luau source inside an actor’s Lua state. The first argument may be an Actor instance from getactors or a thread handle from getactorthreads. Extra arguments are deep-copied into the actor and arrive as the chunk’s varargs. The code runs with Athena’s full environment, so functions like getgc and getgenv work inside it. Call this from a serial context, not a parallel phase.

Parameters

Actor or thread
required
The actor instance or thread handle to run on.
string
required
The Luau source to run.
any
Arguments copied into the actor as varargs.

Example

Errors