pesde twistedsignal / replication

replication

replication provides named, shared state that the server owns and replicates to every client. Late joiners fetch the current server snapshot. State lasts for one server session and is never saved.

local replica = require(path.to.Replication)("gameState", {
	status = "waiting",
	score = 0,
})

Use replica.server on the server and replica.client on the client:

replica.server.score(10)
print(replica.client.score())

Writes replicate to all clients by default. Pass false after the new value to keep a path private. Private paths are also omitted from snapshots for clients that join later.

Values are callable and expose changed, observable, dictionary callbacks, and camelCase array helpers such as insertArray and removeArray.