NOTE: I am not asking for a full script or even part of a script. I’m good at scripting. I’m just asking for general Idea, and APIs that I should learn to do this. However, if you are so kind to give me an example or even a full script, I very much won’t mind it 
In my game I am using DataStore2 to save players wins. So “Player1 - 10 wins”, “Player2 - 68 wins” and etc.
I want to make an across server leaderboard, which will show the players with most wins from all the servers ever.
I don’t think I can do this with DataStore2, as it is limited to saving things with player as a key, and retrieving those things only when player is in game, so as far as I know, I will have to use regular DataStore.
The main question is, how should I combine regular DataStore and DataStore2. And also I have never used regular DataStores, so if you could give me the necessary API links to learn, I would be grateful 
Not sure if you mean global leaderboard or something else
But global leaderboard, I am not sure what to use/say for datastore2 because I have no clue how it works. I think you have to make a new datastore just for the leaderboard
You can/should use an ordered data store
Then inside the script for the global leaderboard, get that module and the current datastore
Next you can use :GetSortedAsync and something with :GetCurrentPage for getting a top list
(ex: local Sorted = DataStore:GetSortedAsync(false, 15)
local SortedPage = Sorted:GetCurrentPage()
15 is how far it will go, so basically top 15
Then the rest, use something like i, v in ipairs on SortedPage then get the key and rank, you could also probably get the player from the key depending on how your keys work. Roblox also has :GetNameFromUserIdAsync which can be used for that
The rest is pretty self explanatory if you know how to script already
Basically just putting that all on Guis
Hope this helped!
1 Like