|
| 25 Feb 2016 07:37 PM |
data = game:GetService('DataStoreService'):GetDataStore('datast0re')
game.Players.PlayerAdded:connect(function(p) local hidden = Instance.new("Model", p) hidden.Name = "hiddenstats" local Points = Instance.new('StringValue', hidden) Points.Name = "Points" key = 'usertest_'..p.userId if data:GetAsync(key) ~= nil then Points.Value = data:GetAsync(key)[4] end end)
--- above works, only this part is broken ---- game.Players.PlayerRemoving:connect(function(p) key = 'usertest_'..p.userId local save = {p.hiddenstats.Points.Value} data:SetAsync(key[4], save) end)
please help I beg u |
|
|
| Report Abuse |
|
|
Mxiko
|
  |
| Joined: 20 Apr 2012 |
| Total Posts: 74 |
|
|
| 25 Feb 2016 07:41 PM |
p.leaderstats.Points:SaveNumber()
|
|
|
| Report Abuse |
|
|
|
| 25 Feb 2016 07:46 PM |
no dude what the fudge thats data persistent
i only want datastore so plz help |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 25 Feb 2016 07:53 PM |
local save = {} save[4] = p.hiddenstats.Points.Value data:SetAsync(key, save)
|
|
|
| Report Abuse |
|
|