How to make a simple global leaderboard

By doing that check and then returning it. You’d also want to reverse the sort order (set smallestFirst to true).

Hello, this works but does it work globally or only in one server? I saved some values in a data store to my userid and when my friend tested it too it didn’t show?

This should work globally. There is a delay in between requests, so make sure you wait at least a minute before deciding it doesn’t work. Otherwise, it might be your specific set up that is broken, in which case make sure you followed the guide properly.

Quick question, say if a player is 9 hours ahead of another player in USA California (the time the os.time gives I believe).

It is 3PM, January 1st, 2020 for that player in California. Would the player 9 hours ahead of the California player see a different leaderboard? (since it’s 12AM, January 2nd, 2020 and a new day for that player)

Since we use UTC time, timezones are irrelevant. It’s not a good idea to try and adjust to timezones, as you’ll need to keep track of a lot more data.

If you want to make it easier for players to understand, you can always add a “resets in” text somewhere which counts down to the end of the day (using UTC time).

yeah that’s smart! Actually, like you said, I’ve seen “time in UTC” and “resets in hh mm ss” before (like in ZO and a donate game). That’ll be enough to let the players know.

Also, if you do resets, you should also have an update counter which tells you how long before new data will be retrieved.

There’s a lot of little things that can be added - every little feature makes your game feel more polished.

1 Like

Hey, i need a little help. Send me the source code because it got deleted the orignal source code of the leaderboard

The source code is still there. Please make sure you read the notice about PlayerPoints at the top, though.

oh okay, i actually understanded. Im working on a private Project, and i was searching a global leaderstats for my own game.

Value is not a valid member of Frame “EekPlayz09”

named the value gui score instead of value

The leaderboard does not save for some reason?

Please see the notice at the top. You’ll have to convert this leaderboard from using PointsService to datastores.

It’s on my to do list to get this tutorial updates but I’ve got a lot on my plate at the moment unfortunately.

Idk if its my fault but it doesn’t work

This method does work, and is still working as of 2024. You’ll have to switch off of PointsService, though.

How can ı save large number. e.g. 100Oc 154No etc.

If you’re working with large numbers (greater than the limit of roblox numbers), you probably will need to encode the data with less precision. For example, instead of storing 5.5, 10.3, 15.2, you could store 1, 2, 3 by doing int division of 5, allowing for 5 times as many values. In your case, it might be better to store a power instead of a number, for example instead of 100, 1000, 10000, you could store 2, 3, 4. (10^x to get back your number).

I’d recommend looking at how other games handle this as this is a common enough problem in computing that there are many possible solutions.

2 Likes

This tutorial is great for a beginner scripter like me. Thanks, But when I was following the tutorial I didn’t see any pictures for the UI so I couldn’t figure out the configurations where to put the UI at. Can you update the pictures?

This post is old enough that at some point when the devfourm was updated the images were lost. I don’t have the originals - it is on my todo list to remake this tutorial at some point but I don’t know when.

For reference: Images, gif, video links and avatars appear broken