OwlProfile:Observe(key: string, callback: function): () -> ()
Server OnlyAttaches a live reactive listener to state paths, tracking data value mutations instantly. Returns an unbind cleanup function wrapper.
Parameters
key*string | Target pathway string to monitor. Use '*' to track all mutations across the profile root structure. |
callback*function | Fires instantly upon state changes, receiving (newValue, oldValue) values as parameters. |
Returns
functionDisconnect unbind routine callback wrap controller handler.
local stopObserving = profile:Observe("Coins", function(newCoins, oldCoins)
print(("Coins shifted from %s to %s"):format(tostring(oldCoins), tostring(newCoins)))
end)