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: Im trying to load data but dont work

Previous Thread :: Next Thread 
louisphilippe2 is not online. louisphilippe2
Joined: 30 Apr 2011
Total Posts: 298
02 Nov 2013 02:50 PM
PlayerName = script.Parent.Parent.Parent.Parent

while true do
wait(0.01)
PlayerName:WaitForDataReady()
if PlayerName.DataReady then
script.Parent.Money.Value = PlayerName:LoadNumber("Money Of "..PlayerName.Name)
wait(1)
print("Loaded")
script.Parent.Save.Disabled = false
script.Disabled = true
end
end
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
02 Nov 2013 02:57 PM
Uh... I'm just gonna rewrite that for you. Also, this can't be a LocalScript.

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

player:WaitForDataReady()
local money = player:LoadNumber("Money Of " .. player.Name) -- Why would you name it that?
wait(1)
print("Loaded")
script.Parent.Save.Disabled = false -- Don't know what this does
-- script.Disabled = true <- unnecessary, the script is over.
Report Abuse
louisphilippe2 is not online. louisphilippe2
Joined: 30 Apr 2011
Total Posts: 298
02 Nov 2013 03:04 PM
This dont help
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
02 Nov 2013 03:06 PM
Sorry, forgot a line. Also, show us the line where you're saving the data.

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

player:WaitForDataReady()
local money = player:LoadNumber("Money Of " .. player.Name)
if money then script.Parent.Money.Value = money end
wait(1)
print("Loaded")
script.Parent.Save.Disabled = false -- Still don't know what this does
Report Abuse
louisphilippe2 is not online. louisphilippe2
Joined: 30 Apr 2011
Total Posts: 298
02 Nov 2013 06:04 PM
Thx but i learn it my self.
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