1 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

SortDirection

Controls the ordering direction of results returned by APIs that support sorted retrieval, such as DataStore:ListVersionsAsync() and MemoryStoreSortedMap:GetRangeAsync(). Pass SortDirection.Ascending to receive items ordered from lowest to highest (or oldest to newest), and SortDirection.Descending to receive them from highest to lowest (or newest to oldest).

Items

NameValueDescription
Ascending0Orders results from lowest to highest value, or from oldest to newest entry.
Descending1Orders results from highest to lowest value, or from newest to oldest entry.

Ascending

Orders results from lowest to highest value, or from oldest to newest entry.

FieldValue
value0

Descending

Orders results from highest to lowest value, or from newest to oldest entry.

FieldValue
value1