of     1   

jakej78b
#128368711Tuesday, March 18, 2014 6:29 AM GMT

local ds = game:GetService("DataStoreService"):GetDataStore("LeaderStats") Game.Players.PlayerAdded:connect(function(plr) local ls = Instance.new("IntValue") ls.Name = "leaderstats" ls.Parent = plr local stat = Instance.new("IntValue") stat.Parent = ls stat.Value = ds:GetAsync(plr.userId.."_Tester") stat.Name = "Tester" end) game.Players.PlayerRemoving:connect(function(plr) ds:SetAsync(plr.userId.."_"..child[i].Name,plr.leaderstats["Tester"].Value) end) -------------------------------- 01:26:17.875 - ServerScriptService.DataStoreTest:9: attempt to index upvalue 'ds' (a nil value)
jakej78b
#128368747Tuesday, March 18, 2014 6:32 AM GMT

Also, slight error that I just noticed in the PlayerRemoving section, but it doesn't effect the problem and here is the code I updated: game.Players.PlayerRemoving:connect(function(plr) ds:SetAsync(plr.userId.."_Tester",plr.leaderstats["Tester"].Value) end)
Goldamass
#128368777Tuesday, March 18, 2014 6:34 AM GMT

Did you open it from the website and are you using a local server?
jakej78b
#128368815Tuesday, March 18, 2014 6:37 AM GMT

I was using a local server, but according to wiki you can use a local server, or even single player for that matter, it just saves the data on your PC.
jakej78b
#128368823Tuesday, March 18, 2014 6:37 AM GMT

Yes,yes of course. It worked perfectly online. +_+
Goldamass
#128368839Tuesday, March 18, 2014 6:38 AM GMT

yeah you have to open it from the develop page, you can't use a locally stored file

    of     1