:Create

Creates a new, replicated data entry on the server. Once created, this data can be requested or listened to by clients (subject to authorization).

If the key has not been pre-registered with :RegisterKey(), this function will also register it. Any options provided here will be locked in for the lifetime of the key.


DataReplicator:Create(realKey: string, data: any, options: table?)


  • realKey: string

    The unique, case-sensitive key for the data. Must not already exist.

  • data: any

    The initial data to be stored. Can be any Roblox-serializable type.

  • options: table?

    An optional dictionary to configure advanced features for this data key.

    • Encrypted: boolean - (Default: false) If true, all data for this key will be protected by transport encryption. A unique session key is securely established for each player using a post-quantum key exchange. Best for sensitive information like currency or private settings.

    • Priority: string - (Default: "Medium") Sets the update priority. Can be "High", "Medium", or "Low". Use "High" for critical gameplay data.

    • UseDeltaCompression: boolean - (Default: false) If true, only changes within a table will be replicated after the initial full sync. Highly recommended for large tables like inventories or skill trees to save network bandwidth.

Last updated