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

Help creating a global leaderboard?

Asked by
trecept 367 Moderation Voter
5 years ago

I've made a datastore system for stats and items, all is working pretty well and I've made my own server leaderboard, I'm just wondering on how to go about creating a global leaderboard. Will I have to create a new ordered datastore and save the stats in a normal datastore AND an ordered datastore? I will also assume that I need to have error handling for ordered datastores, just wondering if I should be creating a new one and if I'm just re-saving the stats.

1 answer

Log in to vote
1
Answered by
Avigant 2374 Moderation Voter Community Moderator
5 years ago

All you're doing is re-saving the same information into an OrderedDataStore, yes, you'd handle it just like saving to a normal DataStore. Update the leaderboard GUI once or twice a minute, because the requests you can make are limited.

Check out the Wiki page on this topic for relevant example code on the bottom.

Ad

Answer this question