BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
|
| 30 Jul 2014 09:19 PM |
local datastore = game:GetService("DataStoreService"):GetDataStore("DataStore")
function PlayerEntered(player) repeat wait() until player.Character local stats = Instance.new("IntValue") stats.Parent = player stats.Name = "leaderstats" local shells = Instance.new("IntValue") shells.Parent = stats shells.Name = "Shells" if datastore:GetAsync("Points_"..player.Name) ~= nil then shells.Value = datastore:GetAsync(player.Name) else shells.Value = 0 end shells.Changed:connect(function(Val) datastore:SetAsync("Points "..player.Name, Val) end) if player.Name == "BruceAB12" or player.Name == "Player1" or player.Name == "HTC569" or player.Name == "daniel1016" then player.leaderstats.Shells.Value = player.leaderstats.Shells.Value + math.random(10,20) end end
game.Players.PlayerAdded:connect(PlayerEntered)
No output. The value doesn't save :/ |
|
|
| Report Abuse |
|
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
| |
|
BruceAB12
|
  |
| Joined: 19 Jan 2012 |
| Total Posts: 3238 |
|
|
| 30 Jul 2014 10:18 PM |
| I fixed it thanks for the help |
|
|
| Report Abuse |
|
|