025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
| |
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 27 Jan 2015 12:57 PM |
was wondering this because I added another datastore and my game is acting weird
R$2,673 |
|
|
| Report Abuse |
|
|
Fragility
|
  |
| Joined: 12 Mar 2011 |
| Total Posts: 483 |
|
|
| 27 Jan 2015 12:57 PM |
local ds1=game:GetService("DataStoreService"):GetDataStore("DataStore1") local ds2=game:GetService("DataStoreService"):GetDataStore("DataStore2") |
|
|
| Report Abuse |
|
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 27 Jan 2015 01:00 PM |
Frag
I know, but I was wondering if it messes up anything or etc
R$2,673 |
|
|
| Report Abuse |
|
|
| |
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 27 Jan 2015 01:02 PM |
thanks
also, can you help me with this? eror line 10: attempting to index a boolean value
local datastore = game:GetService("DataStoreService"):GetDataStore("shed")
game.Players.PlayerAdded:connect(function(p) local shedletsky = Instance.new("BoolValue", p) shedletsky.Name = "shedletsky" if not datastore:GetAsync("Shedletsky"..p.userId) then --if they dont have a save shedletsky.Value = false else --yay! they have a save p:WaitForDataReady() --line 10-- if (datastore:GetAsync("Shedletsky"..p.userId).Value == true) then shedletsky.Value = true else shedletsky.Value = false end end end)
game.Players.PlayerRemoving:connect(function(player) datastore:SetAsync("Shedletsky"..player.userId, player.shedletsky.Value) end)
R$2,673 |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2015 01:03 PM |
waitfordataready is for datapersistence not datastores
also wtf r u trying to do on line 10
|
|
|
| Report Abuse |
|
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 27 Jan 2015 01:04 PM |
nvm fixed it
local datastore = game:GetService("DataStoreService"):GetDataStore("shed")
game.Players.PlayerAdded:connect(function(p) local shedletsky = Instance.new("BoolValue", p) shedletsky.Name = "shedletsky" if not datastore:GetAsync("Shedletsky"..p.userId) then --if they dont have a save shedletsky.Value = false else --yay! they have a save p:WaitForDataReady() shedletsky.Value = datastore:GetAsync("Shedletsky"..p.userId) end end)
game.Players.PlayerRemoving:connect(function(player) datastore:SetAsync("Shedletsky"..player.userId, player.shedletsky.Value) end)
R$2,673 |
|
|
| Report Abuse |
|
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 27 Jan 2015 01:05 PM |
@cheif
oh, a few days ago I was learning about datastores, and someone said add :WaitForDataReady
R$2,673 |
|
|
| Report Abuse |
|
|