Skip to content

Class · inherits GlobalDataStore

OrderedDataStore

Official docs ↗

A GlobalDataStore that also allows for ordered data store entries.

About OrderedDataStore

A OrderedDataStore is essentially a GlobalDataStore with the exception that stored values must be integers. It exposes a method GetSortedAsync() which allows inspection of the entries in sorted order using a DataStorePages object.

Ordered data stores do not support versioning and metadata, so DataStoreKeyInfo is always nil for keys in an OrderedDataStore. If you need versioning and metadata support, use a DataStore.

Ordered data stores do not support the optional userIds parameter for SetAsync() or IncrementAsync().

See Data stores for an overview on how to use ordered data stores.

Methods 1

  • GetSortedAsync(ascending: boolean, pagesize: int, minValue: Variant, maxValue: Variant) → DataStorePagesYieldsReturns a DataStorePages object.

    Returns a DataStorePages object. The sort order is determined by ascending, the length of each page by pageSize, and minValue/maxValue are optional parameters which filter the results.

    See Error codes and limits for request limits and descriptions of the error codes.

OrderedDataStore also has every member of GlobalDataStore. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.