> ## 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

> Retorna a Actor Instance associada ao Luau thread atual. A function não recebe arguments. Ela resolve o Luau thread atual pelo mesmo actor resolver usado por getactorfromthread: o thread data deve existir, Actor reference deve existir, reference count deve ser maior que 0 e the associated Actor deve conter uma non-expired weak reference. Se não houver valid actor reference, a function retorna nil.

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

  ## Aliases

  * `get_current_actor`

  ## Retornos

  <ResponseField name={"actor"} type={"Instance | nil"}>
    Actor Instance resolvida a partir da the associated Actor weak reference do thread atual, ou nil quando não há valid actor reference.
  </ResponseField>

  ## Exemplo

  Resolve the Actor Instance associated with the current Luau thread.

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

  print(actor)
  ```
</div>
