Alias
getcallbackmember
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
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.
getcallbackvalue(instance: Instance, property: string): function | nil
getcallbackmemberlocal bindable = Instance.new("BindableFunction")
bindable.OnInvoke = function(value)
return value * 2
end
local callback = getcallbackvalue(bindable, "OnInvoke")
if callback then
print(callback(21))
end