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

> Instance의 callback property에 저장된 Lua callback function을 읽습니다. 첫 번째 인수는 Instance object여야 하고 두 번째 인수는 string property name이어야 합니다. instance reference는 유효해야 합니다. property name은 Roblox property metadata를 통해 해석되며 타입이 LUA_CALLBACK인 property를 가리켜야 합니다. property descriptor가 없거나, property가 LUA_CALLBACK이 아니거나, callback field offset이 없거나, 저장된 callback이 없거나, LiveLuaRef가 없거나, callback이 다른 Lua global state에 속하거나, 참조된 값이 function이 아니면 function은 nil을 반환합니다. 첫 번째 callback slot에 callback이 없을 때 async callback field fallback도 확인합니다. 이 function은 property를 업데이트하지 않습니다.

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

  ## 별칭

  * `getcallbackmember`

  ## 인수

  <ParamField path={"instance"} type={"Instance"} required>
    callback property를 검사할 Instance object입니다. Invalid Instance values는 argument error를 발생시킵니다.
  </ParamField>

  <ParamField path={"property"} type={"string"} required>
    Roblox property metadata를 통해 해석되는 string property name입니다. LUA\_CALLBACK properties만 function을 반환할 수 있습니다.
  </ParamField>

  ## 반환값

  <ResponseField name={"callback"} type={"function | nil"}>
    callback property가 저장한 Lua function 또는 function이 읽을 수 있는 function을 해석할 수 없을 때 nil입니다.
  </ResponseField>

  ## 예제

  BindableFunction.OnInvoke에 저장된 callback function을 읽습니다.

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