Hey guys, so I was recently wondering what are the pros and cons of using OrderDataStores VS normal DataStores.
I have personally never used OrderedDataStores for anything yet, how ever I was recently making a global leaderboard system, where I needed to get all the keys (players) from the DataStore, but upon research I found out there is no built-in ways to do it with regular DataStores, however OrderedDataStores have this functionality. I know that I could use workarounds such as making a separate key called “Keys” or smth like that, and store all the keys in there so I can access them, however I was wondering if it would be easier and more efficient to use OrderedDataStores.
So if you can provide any insight on either of the 2 questions I would much appreciate it.
OrderDataStores are used for storing data. Just like normal DataStores. The thing with OrderDataStores is that the stored value MUST be a positive integer, so it is definitely not an ideal way of saving stuff for the players.
So why use OrderDataStores? The main use for it is for leaderboards. The OrderedDataStore has a method called GetSortedAsync. With this you can require pages of data you can use for your leaderboard.
A nice documentation and example is to be found on the developer hub: OrderedDataStore
Thanks but I’m going to make this leaderboard solely by myself, no tutorials or nothing, just wanna D.I.Y it, and then eventually make it into my own tutorial video on YT
Im not going to copy and paste even if I weren’t to do it all myself, I already understand what I need to do, I just wanted to know whether to use OrderedDS or DS
you could try making leader board using both normal datastore and ordered datastore it would be a grate learning experiences in seeing the benefits and downfalls for each