What do you want to achieve? Keep it simple and clear!
So im making a game with my friend, and im trying to make a top 1 leaderboard similar to a game (i forgot the name of the game) which is displaying player with highest stat and updates (of course)
What is the issue? Include screenshots / videos if possible!
i cant im too stupid to figure out
What solutions have you tried so far?
free model global leaderboard
please make a basic code because im tired its been 2 days
EDIT: i know that full code is againsts the rules but please
To make a leaderboard system like this, you need to use Ordered Datastores. If you want me to provide you with a script, I can try making one. Would you like to only display the highest rank, or all the top ranks?
local ds = game:GetService("DataStoreService")
local ordered_data_store = ds:GetOrderedDataStore("YOUR_DATASTORE_HERE") -- Replace it with your datastore
local Pages = ordered_data_store:GetSortedAsync(false,1) -- This sorts the datastore to pages which only have 1 key.
while true do
local Keys = Pages:GetCurrentPage() -- This grabs the keys of the current page.
for i, v in pairs(Keys) do -- This will loop through all the keys of the page (in this case, it's only 1)
When you call the GetHighestRank function, it returns a table which contains the key name and value. My explanations in the script aren’t very clear, so if you want me to give you more details, I can.