Yuari
Documentation
Docs/Reflection/setcallbackvalue

setcallbackvalue

Writes an instance callback.

Syntax

setcallbackvalue(instance: Instance, property: string, fn: function) -> nil

Parameters

ParameterTypeDescription
instanceInstanceThe Instance to read from or modify.
propertystringThe property name to access.
fnfunctionThe function or callback to use.

Returns

TypeDescription
nilThis function does not return a value.

Description

setcallbackvalue is part of the Reflection library. Reflection walks Roblox's property metadata to read or write values that are normally hidden from scripts.

The change is applied directly to the live target, so later reads observe the updated value.

The aliases setcallbackmember, set_callback_value, set_callback_member resolve to the same implementation.

Example

setcallbackvalue(workspace, "ChildAdded", function(child)
    print(child)
end)

Notes

  • Aliases: setcallbackmember, set_callback_value, set_callback_member.
  • Reflection reads live property metadata; hidden-property writes can desynchronise client state.