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

> Reads a Lua callback function stored in a callback property on an Instance. The first argument must be Instance object and the second argument must be a string property name. The instance reference must be valid. The property name is resolved with Roblox property metadata and must refer to a property whose type is LUA_CALLBACK. If the property descriptor is missing, the property is not LUA_CALLBACK, the callback field offset is missing, no callback is stored, the LiveLuaRef is missing, the callback belongs to a different Lua global state, or the referenced value is not a function, the function returns nil. It also checks the async callback field fallback when the first callback slot has no callback. The function does not update the property.

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

  ## Aliases

  * `getcallbackmember`

  ## Arguments

  <ParamField path={"instance"} type={"Instance"} required>
    Instance object whose callback property should be inspected. Invalid Instance values raise an argument error.
  </ParamField>

  <ParamField path={"property"} type={"string"} required>
    Property name to resolve with Roblox property metadata. Only LUA\_CALLBACK properties can return a function.
  </ParamField>

  ## Returns

  <ResponseField name={"callback"} type={"function | nil"}>
    Lua function stored by the callback property, or nil when the function cannot resolve a readable function.
  </ResponseField>

  ## Example

  Read the callback function stored in a callback property such as 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>
