So I have a game with multiple maps and I am not sure how to start going about making a leaderboard with stats that save through the multiple maps. (examples: Ultimate Driving, Swordburst 2, etc) What would I need to do to start out? As well as how would I make the player's tools save through multiple games?
"Concept" - How would I go about making a leaderboard save through multiple games?
3 answers
DataStores and OrderedDataStores can be shared between other places in the same game universe.
If you created a DataStore, and or OrderedDataStore, you can access it in a different place in the same game universe by getting the datastore with the name that was given to it.
Say you've created an OrderdedDataStore with the name 'Ods' in the universe's start place:
local ods = game:GetService('DataStoreService'):GetOrderedDataStore('Ods')
If you wanted to access it in another place in the universe, get it by the same name:
local ourOds = game:GetService('DataStoreService'):GetOrderedDataStore('Ods')
In order to save data in general you would need to use the Roblox Datastores:
http://robloxdev.com/articles/Data-store
The datastores save throughout multiple Places as long as they are all in a singular Universe.
http://robloxdev.com/articles/Multi-Place-Games
Datatores can only save particular types of values inside them which include:
Numbers, Strings, Tables, Booleans, or nil
So in order to save Objects such as a tool, or a Vector such as a position. You would need to come up with a clever system using the available datatypes to store the unusable datatypes in a way that you can load them back up again and determine what they are in Object or Vector form (as an example).
If you need the leaderboard to save through multiple instances of a server (when the player leaves and joins again later), you need to learn about datastores.
Here's a tut on how to save a currency value with a datastore (which might not be what youre looking for): http://robloxdev.com/articles/In-Game-Currency-with-Roblox
there are also videos on youtube that show you how to save leaderboard values but i wont bother linking you to those since theyre easy to find
good luck!
4 comments
Ive looked at those and I understand some of that, but what about loading that leaderboard in another game?
you get the value/table/whatever using datastore:GetAsync(the string you've set for the player) then store it into the value thats on the leaderboard.
i mean you do that when a player join using Players:OnPlayerJoin
you do Players:OnPlayerJoin:Connect(function() load the data off the data store using datastorename:GetAsync and load it into the players leaderboard value end
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
How would I go about adding a place to a game universe? I remember doing it once before but I cant remember.
Whenever I try and add a place it simply says "Cannot use start place"