Yuari
Documentation
Docs/Actors/get_current_actor

get_current_actor

Returns the Actor instance owning the current thread, or nil.

Syntax

get_current_actor() -> Instance

Parameters

This function takes no parameters.

Returns

TypeDescription
InstanceThe Actor instance owning the current thread, or nil

Description

get_current_actor is part of the Actors library. Actor helpers target Roblox's parallel actor scheduler. Code sent to an actor runs in that actor's isolated Luau context rather than the current script thread.

The call is read-only: it resolves the current value when invoked and does not change the underlying state.

The aliases getcurrentactor() resolve to the same implementation.

Example

local actor = get_current_actor()
print(actor)

Notes

  • Aliases: getcurrentactor().
  • Actor calls run in a separate parallel state; data passed into the actor must be representable in Luau.