getcallbackvalue
Reads a callback property such as OnInvoke or OnServerInvoke, which normally cannot be read back.
Signature
getcallbackvalue(instance: Instance, property: string): ((...any) -> ...any)?Parameters
instanceInstanceThe instance holding the callback.
propertystringThe callback property name.
Returns
function?
Example
local bindable = Instance.new("BindableFunction")
bindable.OnInvoke = function()
return "called"
end
local callback = getcallbackvalue(bindable, "OnInvoke")
print(callback()) --> called