replica:SetValue<V>(path: Path, value: V): void

Server Only

Writes a single value at the given path and queues it for replication. Fires matching ListenToChange listeners, including bubbled ones on ancestor paths.

Parameters

path*
Path
Array of string/number keys describing where to write, e.g. {"Inventory", "Gold"}.
value*
V
The new value to write.

Returns

voidNo return value.
replica:SetValue({"Gold"}, replica.Data.Gold + 100)