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

# getcallbackvalue

> Odczytuje Lua callback function zapisana w callback property na Instance. Pierwszy argument musi byc Instance object, a drugi argument musi byc string property name. instance reference musi byc poprawny. property name jest rozwiazywany przez Roblox property metadata i musi wskazywac property typu LUA_CALLBACK. Jesli property descriptor nie istnieje, property nie jest LUA_CALLBACK, callback field offset nie istnieje, nie zapisano callback, LiveLuaRef nie istnieje, callback nalezy do innego Lua global state albo wskazana wartosc nie jest function, function zwraca nil. Sprawdza tez async callback field fallback, gdy pierwszy callback slot nie ma callback. Function nie aktualizuje property.

<div className="real-function-page">
  ```lua theme={null}
  getcallbackvalue(instance: Instance, property: string): function | nil
  ```

  ## Aliasy

  * `getcallbackmember`

  ## Argumenty

  <ParamField path={"instance"} type={"Instance"} required>
    Instance object, na ktorym sprawdzana jest callback property. Invalid Instance values rzucaja argument error.
  </ParamField>

  <ParamField path={"property"} type={"string"} required>
    string property name rozwiazywany przez Roblox property metadata. Tylko LUA\_CALLBACK properties moga zwrocic function.
  </ParamField>

  ## Zwroty

  <ResponseField name={"callback"} type={"function | nil"}>
    Lua function zapisana przez callback property, albo nil, gdy function nie moze rozwiazac czytelnej function.
  </ResponseField>

  ## Przykład

  Odczytuje callback function zapisana w BindableFunction.OnInvoke.

  ```lua theme={null}
  local bindable = Instance.new("BindableFunction")
  bindable.OnInvoke = function(value)
      return value * 2
  end

  local callback = getcallbackvalue(bindable, "OnInvoke")
  if callback then
      print(callback(21))
  end
  ```
</div>
