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

> Doc Lua callback function duoc luu trong callback property tren Instance. Doi so dau tien phai la Instance object va doi so thu hai phai la string property name. instance reference phai hop le. property name duoc resolve qua Roblox property metadata va phai tro den property co type LUA_CALLBACK. Neu thieu property descriptor, property khong phai LUA_CALLBACK, thieu callback field offset, khong co callback duoc luu, thieu LiveLuaRef, callback thuoc Lua global state khac, hoac gia tri duoc tham chieu khong phai function, function tra ve nil. No cung kiem tra async callback field fallback khi callback slot dau tien khong co callback. Function khong cap nhat property.

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

  ## Alias

  * `getcallbackmember`

  ## Đối số

  <ParamField path={"instance"} type={"Instance"} required>
    Instance object noi callback property duoc kiem tra. Invalid Instance values tao argument error.
  </ParamField>

  <ParamField path={"property"} type={"string"} required>
    string property name duoc resolve qua Roblox property metadata. Chi LUA\_CALLBACK properties co the tra ve function.
  </ParamField>

  ## Giá trị trả về

  <ResponseField name={"callback"} type={"function | nil"}>
    Lua function duoc luu boi callback property, hoac nil khi function khong the resolve function co the doc.
  </ResponseField>

  ## Ví dụ

  Doc callback function duoc luu trong 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>
