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

How do I use OrderedDataStores with existing regular DataStore?

Asked by 6 years ago

I'm trying to create a leaderboard with OrderedDataStores. The thing is, I already have an existing regular DataStore. How do I get the values from the regular DataStore and put them onto the OrderedDataStore? I'm not asking for a script. I'm just trying to really figure out how OrderedDataStores work. Any help?

0
Are the values in your normal datastore integers? If they are then why can't you just iteratively get each entry and then transfer it to your OrderedDataStore? thebayou 441 — 6y

1 answer

Log in to vote
0
Answered by
Faeyll 22
6 years ago

The only difference for storing data with an OrderedDataStore versus a normal DataStore is that an OrderedDataStore's value must be an integer (positive whole numbers). If all of your values are already integers then you can just transfer the keys and values right over. If they aren't all integers, you have to think of a way to convert that data to an integer in a way that would make sense and generate the order you want. You may end up just keeping the existing DataStore, and making a second OrderedDataStore that stores their ID and a score calculated off of the normal DataStore's values.

Ad

Answer this question