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

> Zwraca Actor Instance powiązaną z bieżącym Luau thread. Function nie przyjmuje arguments. Rozwiązuje bieżący Luau thread przez ten sam actor resolver, którego używa getactorfromthread: thread data musi istnieć, Actor reference musi istnieć, reference count musi być większe od 0, a the associated Actor musi zawierać non-expired weak reference. Jeśli nie ma valid actor reference, function zwraca nil.

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

  ## Aliasy

  * `get_current_actor`

  ## Zwroty

  <ResponseField name={"actor"} type={"Instance | nil"}>
    Actor Instance rozwiązana z the associated Actor weak reference bieżącego thread, albo nil, gdy nie ma valid actor reference.
  </ResponseField>

  ## Przykład

  Resolve the Actor Instance associated with the current Luau thread.

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

  print(actor)
  ```
</div>
