|
| 17 Jul 2014 10:59 PM |
I cannot get this data store script to work. "mapNumb" is an IntValue inside of starterpack. PLEASE HELP ME, MY SANITY IS AT RISK RIGHT NOW.
game.Players.PlayerRemoving:connect(function(player) local datastore = game:GetService("DataStoreService"):GetDataStore(player.Name.."Stats") player:WaitForDataReady() wait(2) mapDist = player.Backpack:FindFirstChild("mapNumb").Value dataStore:SetAsync(player.Name, mapDist) end)
game.Players.PlayerAdded:connect(function(player) local datastore = game:GetService("DataStoreService"):GetDataStore(player.Name.."Stats") repeat wait() until player.Character player:waitForDataReady() wait(2) player.Backpack.mapNumb.Value = datastore:GetAsync(player.Name) if player.Backpack.mapNumb.Value == 0 then player.Backpack.mapNumb.Value =1 end blocks = Instance.new("NumberValue", Workspace) blocks.Value = 20 blocks.Parent = player blocks.Name = "blocksLeft" blocks2 = Instance.new("NumberValue", Workspace) blocks2.Value = 33 blocks2.Parent = player blocks2.Name = "bloocksLeft" gameGui = game.Lighting.gameGui:Clone() gameGui.Parent = player.PlayerGui wait(2) end)
|
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 11:09 PM |
dangit, i know people are seeing this
someone help already |
|
|
| Report Abuse |
|
|
pa00
|
  |
| Joined: 06 Jun 2010 |
| Total Posts: 451 |
|
|
| 17 Jul 2014 11:23 PM |
local datastore = game:GetService("DataStoreService"):GetDataStore(player.Name.."Stats")
By doing this you are making a unique datastore for every single player, every time a new player connects.
Just make your DataStore something like "Stats"
local datastore = game:GetService("DataStoreService"):GetDataStore("Stats") |
|
|
| Report Abuse |
|
|
| |
|
HGuitar
|
  |
| Joined: 08 Sep 2011 |
| Total Posts: 106 |
|
|
| 18 Jul 2014 12:34 AM |
| I think you may have lost your sanity already with what your wearing. Seriously, what were you thinking when you u bought that??? |
|
|
| Report Abuse |
|
|