> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getcurrentactor

> Devuelve la Actor Instance asociada con el Luau thread actual. La function no toma arguments. Resuelve el Luau thread actual mediante el mismo actor resolver usado por getactorfromthread: debe existir el thread data, debe existir Actor reference, reference count debe ser mayor que 0 y the associated Actor debe contener una non-expired weak reference. Si no hay valid actor reference, la function devuelve nil.

<div className="real-function-page">
  ```lua theme={null}
  getcurrentactor(): Instance | nil
  ```

  ## Alias

  * `get_current_actor`

  ## Retornos

  <ResponseField name={"actor"} type={"Instance | nil"}>
    Actor Instance resuelta desde la the associated Actor weak reference del thread actual, o nil cuando no hay valid actor reference.
  </ResponseField>

  ## Ejemplo

  Resolve the Actor Instance associated with the current Luau thread.

  ```lua theme={null}
  local actor = getcurrentactor()

  print(actor)
  ```
</div>
