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
 

Can somebody help me fix this? (Save script)

Previous Thread :: Next Thread 
icekiller8002 is not online. icekiller8002
Joined: 22 Jan 2013
Total Posts: 6636
04 May 2015 04:40 PM
Code:

local Key = "Tokens"
game.Players.PlayerAdded:connect(function(Player)
Player:WaitForDataReady()
local Score = Player.leaderstats:LoadNumber(Key)
print(""..Score)
end)
game.Players.PlayerRemoving:connect(function(Player)
local Score = Player.leaderstats:SaveNumber(Key,Score)
end)

Error:

21:47:38.784 - SaveNumber is not a valid member of IntValue

I typed this from a lua programming book btw



If I could have anything I wanted I would choose friends
Report Abuse
icekiller8002 is not online. icekiller8002
Joined: 22 Jan 2013
Total Posts: 6636
04 May 2015 04:44 PM
b1



If I could have anything I wanted I would choose friends
Report Abuse
murcury57 is not online. murcury57
Joined: 30 Jun 2010
Total Posts: 90299
04 May 2015 04:51 PM
[ Content Deleted ]
Report Abuse
TheTrueRias is not online. TheTrueRias
Joined: 12 Aug 2014
Total Posts: 1015
04 May 2015 04:52 PM
Player.leaderstats:SaveNumber(Key,Score)

replace that with

Player.leaderstats:SaveNumber(Key,Score.Value)

i think you need to save the property value, not the object
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