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

Data Save Help?

Asked by 10 years ago

So its not saving this stuff and I need some help fixing it. If someone could please fix this I would jump in joy :)

01local DSS = game:GetService('DataStoreService'):GetDataStore('Credits')
02local Sp = game:GetService('DataStoreService'):GetDataStore('Speed')
03function save(plr, value)
04    DSS:UpdateAsync(plr.userId, function(Data)
05        Sp:UpdateAsync(plr.userId, function(Datas)
06            return value
07        end)
08    end)
09end
10function loads(plr)
11    return Sp:GetAsync(plr.userId) or Sp:SetAsync(plr.userId, 0) and 0
12end
13 
14function load(plr)
15    return DSS:GetAsync(plr.userId) or DSS:SetAsync(plr.userId, 0) and 0
View all 34 lines...

1 answer

Log in to vote
0
Answered by 10 years ago

Please take a look at this page on how to post good questions. It helps a lot if you would edit your question accordingly.

I am really missing an explanation. Your code seems to have a few logic problems, which can only be solved if we can fully understand what your are trying to achieve.

Ad

Answer this question