generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: wait for data ready doesnt work

Previous Thread :: Next Thread 
trunks0817 is not online. trunks0817
Joined: 20 Jan 2016
Total Posts: 495
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
trunks0817 is not online. trunks0817
Joined: 20 Jan 2016
Total Posts: 495
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
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
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
ProtectedMethod is not online. ProtectedMethod
Joined: 01 Apr 2011
Total Posts: 5374
13 Aug 2016 02:32 PM
repeat wait() until plr.DataReady
Report Abuse
trunks0817 is not online. trunks0817
Joined: 20 Jan 2016
Total Posts: 495
13 Aug 2016 02:33 PM
thanks ill try it after i finish eating
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
13 Aug 2016 02:34 PM
^

again, deprecated and serves no use if you are not using data persistence
Report Abuse
trunks0817 is not online. trunks0817
Joined: 20 Jan 2016
Total Posts: 495
13 Aug 2016 02:45 PM
how about data store will that be more complex?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
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
trunks0817 is not online. trunks0817
Joined: 20 Jan 2016
Total Posts: 495
13 Aug 2016 02:50 PM
i am on youtube trying to understand it...
Report Abuse
trunks0817 is not online. trunks0817
Joined: 20 Jan 2016
Total Posts: 495
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
trunks0817 is not online. trunks0817
Joined: 20 Jan 2016
Total Posts: 495
13 Aug 2016 03:06 PM
can someone give me an example or template.. please
Report Abuse
trunks0817 is not online. trunks0817
Joined: 20 Jan 2016
Total Posts: 495
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image