|
| 13 Aug 2016 02:28 PM |
| so i am trying to load value and every time i use wait for data ready the script doesnt work anymore can someone help me? |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 02:29 PM |
game.PlayerAdded:connect(function(plr) plr:WaitForDataReady() --rest of the script end
and the script doesnt work anymore. |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 02:31 PM |
| wait for data ready is only for data persistence and that's deprecated so don't use it |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 02:32 PM |
| repeat wait() until plr.DataReady |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 02:33 PM |
| thanks ill try it after i finish eating |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 02:34 PM |
^
again, deprecated and serves no use if you are not using data persistence |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 02:45 PM |
how about data store will that be more complex?
|
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 02:47 PM |
It's not that hard, and it's actually cooler and more organized once you learn it.
|
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 02:50 PM |
| i am on youtube trying to understand it... |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 02:55 PM |
| ok i dont get it can someone please list the things i need to do data store and what they do? |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 03:06 PM |
| can someone give me an example or template.. please |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2016 03:13 PM |
CashStore = 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 cash = Instance.new("IntValue") cash.Parent = stats cash.Name = "Cash" if CashStore:GetAsync("Points_"..player.Name) ~= nil then cash.Value = CashStore:GetAsync("Points_"..player.Name) else cash.Value = 500 end cash.Changed:connect(function(Val) CashStore:SetAsync("Points_"..player.Name, Val) end) end
game.Players.PlayerAdded:connect(PlayerEntered) |
|
|
| Report Abuse |
|
|