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 » Scripting Helpers
Home Search
 

Re: Save data GUI script is not working

Previous Thread :: Next Thread 
cdw500 is not online. cdw500
Joined: 11 Jun 2014
Total Posts: 141
20 Jun 2014 07:38 AM
I get this error when i click the button:
Data for player not yet loaded, wait for DataReady

But when I add player:WaitForDataReady() the button dos not do anything can anyone help me out?

Here is the script.

local player = script.Parent.Parent.Parent.Parent.Parent

function onClicked()
player:WaitForDataReady()
player:SaveNumber("Level", player.Values.Level.Value)
player:SaveNumber("XP", player.Values.XP.Value)
player:SaveNumber("Money", player.Values.Money.Value)
player:SaveNumber("Kills", player.Values.Kills.Value)
player:SaveNumber("Deaths", player.Values.Deaths.Value)
script.Parent.Text = "Game Saved"
wait(2)
script.Parent.Text = "Save Game"
end

script.Parent.MouseButton1Click:connect(onClicked)

Report Abuse
TrainingToTroll is not online. TrainingToTroll
Joined: 27 Oct 2012
Total Posts: 1757
20 Jun 2014 09:18 AM
I have trouble with DataStore bump. Btw, tell meh if you got it.
Report Abuse
mikeyx3000 is not online. mikeyx3000
Joined: 03 Aug 2010
Total Posts: 104
20 Jun 2014 09:38 AM
Are you testing online or in roblox studio?
Report Abuse
cdw500 is not online. cdw500
Joined: 11 Jun 2014
Total Posts: 141
21 Jun 2014 01:34 AM
I solved it myself.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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