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
 

What's wrong with this? (Old data saving stuff)

Previous Thread :: Next Thread 
yelloball is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
31 Jul 2014 08:26 AM
Yeah, I should change to the datastores but I'm to lazy to learn them.

But still I got myself stuck here.
The data doesn't appear to be working annyhow.

game.Players.PlayerAdded:connect(function(p)
if p.DataReady then
print "loading"
script.Parent.txt.Text = (tostring(p:LoadNumber("Money")).."$")
print "loaded"
end
end)


script.Money.Changed:connect(function(newVal)
player:SaveNumber("Money",newVal)
script.Parent.txt.Text = (tostring(newVal).."$")
print(newVal)
end)
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
31 Jul 2014 09:28 AM
Data_P FTW

What do you mean when you say "doesn't appear to be working"?

Also, you can save a loop by replacing if p.DataReady with
p:WaitForDataReady ()
Report Abuse
yelloball is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
31 Jul 2014 09:31 AM
Well it doesn't load anny data I also tried to use a print in the function but no otuput. It doesn't register a player joining.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
31 Jul 2014 09:32 AM
Did you try my method?
Report Abuse
yelloball is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
31 Jul 2014 09:34 AM
This wont even work and I can't find annything that's wrong with it.
The script is inside a playerGui

game.Players.PlayerAdded:connect(function(p)
print"meh"
end)
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
31 Jul 2014 09:35 AM
PlayerAdded is one of the most reliable events I know.

Are you testing this in Play Solo?
Report Abuse
yelloball is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
31 Jul 2014 10:09 AM
Nope testing it online.
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
31 Jul 2014 10:10 AM
I remember when I thought data p was better than data store.

Ohh, the good ol days. But data p's trash now.
Report Abuse
yelloball is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
31 Jul 2014 10:14 AM
Annything wrong with this line?
player.PlayerGui.money.image.txt.Text = (tostring(player:LoadNumber(Money)).."$")
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
31 Jul 2014 10:15 AM
Is this in a LocalScript?

@Accomplishable, if that print statement inside the function isn't printing, then this isn't a matter of Data_P at all.
Report Abuse
yelloball is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
31 Jul 2014 10:16 AM
Nope, server script.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
31 Jul 2014 10:22 AM
Put this in ServerScriptService, not PlayerGui.
You'll have to change the hierarchies accordingly.
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
31 Jul 2014 10:27 AM
data s >
Report Abuse
yelloball is not online. yelloball
Joined: 17 Feb 2010
Total Posts: 2749
31 Jul 2014 10:30 AM
I'll just restart.
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