Actors

run_on_actor

Runs source code inside the context of a target Actor.

Syntax

run_on_actor(actor: Instance, source: string, ...arguments?: ...any)
Aliases runonactor

Arguments

NameTypeDescription
actorInstanceActor instance that should own the operation.
sourcestringSource value used by the operation.
...arguments?...anyArguments forwarded to the target signal, actor, thread, or function.

Description

Runs source code inside the context of a target Actor.

Call it with 3 parameter(s): actor, source, ...arguments. The argument table explains which values are required and which ones only refine the behavior.

It does not return data. Treat the call as an action and handle errors around the call site when needed.

Example

Example call with placeholder values.

run_on_actor(game, "example", nil)