ReaperEVO
|
  |
| Joined: 24 Nov 2016 |
| Total Posts: 54 |
|
|
| 04 Mar 2017 05:32 PM |
so im baffled at why this script wont save 'cash'
here's the scripts DSS = #########################################################
game.Players.PlayerAdded:connect(function(plr)
local uniquekey = plr.UserId local stats = Instance.new('IntValue') stats.Name = 'leaderstats' stats.Parent = plr local cash = Instance.new('IntValue') cash.Name = 'Cash' cash.Parent = stats local GetSaved = DSService:GetAsync(uniquekey)
if GetSaved then cash.Value = GetSaved[1] else local NumbersForSaving = {cash.Value} DSService:SetAsync(uniquekey, NumbersForSaving) print('set') end end)
game.Players.PlayerRemoving:connect(function(plr) local uniquekey = plr.UserId local Savetable = {plr.leaderstats.Cash.Value} DSService:SetAsync(uniquekey, Savetable) end) |
|
|
| Report Abuse |
|
|
ReaperEVO
|
  |
| Joined: 24 Nov 2016 |
| Total Posts: 54 |
|
| |
|
Pete735
|
  |
| Joined: 30 Sep 2012 |
| Total Posts: 133 |
|
|
| 04 Mar 2017 06:18 PM |
DSService is not defined. Change DSS on the top to DSService.
|
|
|
| Report Abuse |
|
|
ReaperEVO
|
  |
| Joined: 24 Nov 2016 |
| Total Posts: 54 |
|
|
| 04 Mar 2017 06:20 PM |
| it is Roblox just hashtagged it out |
|
|
| Report Abuse |
|
|
Pete735
|
  |
| Joined: 30 Sep 2012 |
| Total Posts: 133 |
|
|
| 04 Mar 2017 06:24 PM |
Are you trying the script in studio? That could be the problem.
1. Go onto your place page that you're editing right now 2. Click the 3 bar icon at the top right area 3. Configure Game 4. Make sure "Enable Studio Access to API Services:" is checked.
|
|
|
| Report Abuse |
|
|
ReaperEVO
|
  |
| Joined: 24 Nov 2016 |
| Total Posts: 54 |
|
|
| 04 Mar 2017 06:32 PM |
Yeah thats enabled
also i have multiple places so i dont know if thats the problem. i dont think so because i tested it on another game and i still doesnt work |
|
|
| Report Abuse |
|
|