Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to load all the data from a data store?

Asked by 6 years ago

I want a high score system for my obby. When the player finishes the obby I want to put his time in a data store and then right after load the high score GUI of all the player times recorded in the data store. In order to achieve this I need to copy the high score GUI into the player GUI and then load all of the data from the data store into the GUI scrolling frame with textboxes. However, my problem is that I can't load all the data from the data store. I can only specify a certain player and get their data but not all the data in the data store. How do I do this?

0
You would want to use an ordered data store which only stores integers. You can then get this data back using http://wiki.roblox.com/index.php?title=API:Class/OrderedDataStore/GetSortedAsync User#5423 17 — 6y

1 answer

Log in to vote
0
Answered by
Tomstah 401 Moderation Voter
6 years ago

What you're most likely looking for are "Ordered Data Stores". More specifically, you're looking for this function:

GetSortedAsync(isAscending, pageSize, minValue, maxValue)

This will return a pages object into which you can see a decent amount of your datastore, then you can "turn" the page and access more of it. (If I'm not mistaken).

For more information view this: http://wiki.roblox.com/index.php?title=Ordered_data_store

Ad

Answer this question