How would you change the PageSize of an ordered datastore to more than 100. (or save data for more than 100 people in one ordered datastore)

I’m currently on mobile, and don’t have much time to type, because I have %1 battery.

The title explains it all.

Thank you for any help.

You can save data of a lot more than hundreds people to an ordered data store. Their purpose is to handle large amounts of keys and data for global leaderboards etc.

Ordered data store returns pages. You can request them a couple of times per minute from a single server depending on current player count.

-- Suppose ODS datastore is defined already
ODS:GetSortedAsync(true, 1000, 1, 10e6)
-- 1. Ascending order or not
-- 2. Elements per page
-- 3. Exclude element lower than this min. value
-- 4. Exclude elements lower then set max. value

Returned pages can then be formed into a table (current page) using :GetCurrentPage().

Watch this video for visual explanation: Advanced Roblox Scripting Tutorial #27 - OrderedDataStores (Beginner to Pro 2020) - YouTube.

Furthermore, Dev Hub offers a lot of information about OrderedDataStores - with samples - as well as data storing in general.

Just go to the next page. They’re pages for a reason.

1 Like