Aliasy
getcallbackmember
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Odczytuje Lua callback function zapisana w callback property na Instance. Pierwszy argument musi byc Instance object, a drugi argument musi byc string property name. instance reference musi byc poprawny. property name jest rozwiazywany przez Roblox property metadata i musi wskazywac property typu LUA_CALLBACK. Jesli property descriptor nie istnieje, property nie jest LUA_CALLBACK, callback field offset nie istnieje, nie zapisano callback, LiveLuaRef nie istnieje, callback nalezy do innego Lua global state albo wskazana wartosc nie jest function, function zwraca nil. Sprawdza tez async callback field fallback, gdy pierwszy callback slot nie ma callback. Function nie aktualizuje 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