local cashs = game:GetService("DataStoreService"):GetDataStore('Stats', 'Cash')
function onPlayerAdded(player)
local stats = Instance.new('Folder', player)
stats.Name = 'leaderstats'
local cash = Instance.new('IntValue', stats)
cash.Name = 'Cash'
cash.Value = cashs:GetAsync(player.UserId) or 500
cash.Changed:Connect(function()
cashs:SetAsync(player.UserId, cash.Value)
end)
end
game.Players.PlayerAdded:Connect(onPlayerAdded)
✓ ANSWER ACCEPTED
Is it possible to have datastores that can save throughout the whole entire game/ other places?
1 answer
✓ Accepted answer
Datastores work inside an entire universe (a collection of places under a game). If you want to save outside of one universe and into another, then like fredfishy commented, you would need the HTTP service and an external storage. Note that HTTP request limitations are global though while Roblox datastores are local to the server they are in.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Datastores work throughout an entire game, and any places inside of it. They cannot be accessed by places outside of the game.
Use the HTTP service and write to some external server somewhere.