Actors & channelsOverviewUpdated · 0.744
run_on_actor
Represents execution associated with an actor context.
Aliases
runonactorDetails#
Compiles source text and schedules it in an already running Actor VM, forwarding additional arguments. Returns no values. A newly created Actor without a running VM raises an error; compilation and scheduling can also fail. runonactor is an alias.
Examples#
Example
local actor = Instance.new("Actor")
local ok, err = pcall(run_on_actor, actor, "print(42)")
print(ok, err) -- no running VM for this new Actor
actor:Destroy()