For about 8 months ago, I found a script that would save data to DataService so that the Money players of my game had would save. But when i ran the game about 4 months ago, it didn't work anymore. I've searched after working scripts everywhere but every script i can find was made Before 2016 and doesn't work anymore. Is there anyone that knows what's wrong with the script or Another saving script?
script:
local datastore = game:GetService("DataStoreService") local ds1 = datastore:GetDataStore("MoneySaveSystem")
game.Players.PlayerAdded:connect(function(plr)
local folder = Instance.new("Folder", plr) folder.Name = "leaderstats"
local money = Instance.new("IntValue", folder) money.Name = "Money"
money.Value = ds1:GetAsync(plr.UserId) or 0 ds1:SetAsync(plr.UserId, money.Value)
money.Changed:connect(function() ds1:SetAsync(plr.UserId, money.Value) end)
end)

3 comments
put in codebox.
also, don't use the parent parameter of instance.new, it hinders performance
Any errors in the console?