|
| 11 Jan 2015 08:39 PM |
local DataStore = game:GetService("DataStoreService"):GetDataStore("Points") game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model", player) leaderstats.Name = "leaderstats" local l = Instance.new("IntValue", leaderstats) l.Name = "Level" local key = player.leaderstats.Level --we want to give 50 points to users each time they visit DataStore:UpdateAsync(key, function(Level) local newLevel = Level or 0 --oldValue might be nil game.Workspace.LevelTPer.Touched:connect(function() newLevel = newLevel + 1 return newLevel end) end) end)
Please take this model - http://web.roblox.com/Dead-dogicorn-item?id=202541510 |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2015 08:46 PM |
print "bump 1"
Please take this model - http://web.roblox.com/Dead-dogicorn-item?id=202541510 |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2015 10:53 PM |
b2
Please take this model - http://web.roblox.com/Dead-dogicorn-item?id=202541510 |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 11 Jan 2015 11:02 PM |
Your code makes no sense lol
But I think you're going for something liek this?
local ds = game:GetService("DataStoreService"):GetDataStore("Points")
game.Players.PlayerAdded:connect(function(plr) local leaderstats = Instance.new("Model", plr) leaderstats.Name = "leaderstats" local l = Instance.new("IntValue", leaderstats) l.Name = "Level" local key = tostring(plr.userId).."_money" if ds:GetAsync(key) ~= nil then ds:UpdateAsync(key, function(last) return last + 50; end) else ds:SetAsync(key,50) end end)
|
|
|
| Report Abuse |
|
|
|
| 11 Jan 2015 11:03 PM |
Yeah yeah that
-{cpmoderator12345}- ||:Conquerer of Role-Playing forum:|| ||:average scripter:|| |
|
|
| Report Abuse |
|
|