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

> Lee una Lua callback function almacenada en una callback property de una Instance. El primer argumento debe ser Instance object y el segundo argumento debe ser un string property name. El instance reference debe ser valido. El property name se resuelve mediante Roblox property metadata y debe referirse a una property cuyo tipo sea LUA_CALLBACK. Si falta el property descriptor, la property no es LUA_CALLBACK, falta el callback field offset, no hay callback almacenado, falta LiveLuaRef, el callback pertenece a otro Lua global state, o el valor referenciado no es una function, la function devuelve nil. Tambien comprueba el async callback field fallback cuando el primer callback slot no tiene callback. La function no actualiza la property.

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

  ## Alias

  * `getcallbackmember`

  ## Argumentos

  <ParamField path={"instance"} type={"Instance"} required>
    Instance object en la que se inspecciona la callback property. Invalid Instance values lanzan un argument error.
  </ParamField>

  <ParamField path={"property"} type={"string"} required>
    string property name que se resuelve mediante Roblox property metadata. Solo LUA\_CALLBACK properties pueden devolver una function.
  </ParamField>

  ## Retornos

  <ResponseField name={"callback"} type={"function | nil"}>
    Lua function almacenada por la callback property, o nil cuando la function no puede resolver una function legible.
  </ResponseField>

  ## Ejemplo

  Lee la callback function almacenada en 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>
