Skip to content

Advanced Functions ​

GetReplica() ​

GetReplica() → ReplicaInstance?

Gets the raw Replica instance for advanced operations.

Parameters: None
Returns: ReplicaInstance? - Replica instance, or nil if not loaded

Example
lua
local replica = PlayerState.GetReplica()
if replica then
    -- Access raw Replica API
    print("Replica data:", replica.Data)
    print("Replica tags:", replica.Tags)

    -- Advanced change listener
    replica:OnChange(function(action, path, param1, param2)
        print("Raw change:", action, table.concat(path, "."))
    end)
end

Note

Provides access to the underlying Replica object with enhanced validation

PlayerState - High-Performance Roblox Data Management