replica:ListenToFullChange<T>(listener: (data: T, changes: { ChangeRecord }) -> (), comparator: ValueComparator | nil): () -> ()

Server & Client

Listens to the entire Data table at once. All mutations of any kind that happen within the same Heartbeat frame are grouped into a single call, receiving the full current state alongside the list of individual changes. Ideal for UI that needs to re-render on 'anything changed' without registering one listener per field. An optional comparator (defaults to an inequality check) filters out no-op changes.

Parameters

listener*
FullChangeListener<T>
Called at most once per Heartbeat frame with the current Data and the batch of changes.
comparator
ValueComparator
Decides whether a given old/new pair counts as a real change. Defaults to an inequality check.

Returns

() -> ()Disconnect function. Internally stops the shared Heartbeat connection once no listener remains.
replica:ListenToFullChange(function(data, changes)
    for _, change in changes do
        print(table.concat(change.Path, "."), ":", change.OldValue, "->", change.NewValue)
    end
    RefreshHud(data)
end)