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: level' gold'exp' save

Previous Thread :: Next Thread 
codyw62 is not online. codyw62
Joined: 09 Jun 2011
Total Posts: 413
20 Aug 2011 10:48 PM
how can i add these to my upcoming rpg game?
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
20 Aug 2011 10:50 PM
http://wiki.roblox.com/index.php/Leaderboard
Report Abuse
tdog158 is not online. tdog158
Joined: 08 Jul 2008
Total Posts: 5413
20 Aug 2011 11:21 PM
Use data persistance, ignore redirects to useless webpages.
playerinstance:SaveNumber("Gold",somenumbervalue.Value)
Report Abuse
SpleenYanks is not online. SpleenYanks
Joined: 24 Aug 2008
Total Posts: 921
20 Aug 2011 11:22 PM
^

--[[SIGNATURE! :D]]--
--[[What do you think we are? Scripting circus monkeys? Go back to "Lets Make a Deal".]]--
--[[FLOODCHECK RUINED MY LIFE! I DIDN'T BUY FLOOD INSURANCE! D:]]--
Report Abuse
Bansey is not online. Bansey
Joined: 16 May 2008
Total Posts: 118
21 Aug 2011 01:22 AM
game.Players.Player:WaitForDataReady()
leaderstats = game.Players.Player:FindFirstChild("leaderstats")
if leaderstats then
game.Players.Player:SaveNumber("Gold",leaderstats["Gold"].Value)
game.Players.Player:SaveNumber("Exp",leaderstats["Exp"].Value)
end

game.Players.ChildAdded:connect(function(newPlayer)
newPlayer:WaitForDataReady()
gold = newPlayer:LoadNumber("Gold")
if gold then
newPlayer["leaderstats"]["Gold"].Value = gold
else
newPlayer:SaveNumber("Gold",0)
end
exp = newPlayer:LoadNumber("Exp")
if exp then
newPlayer["leaderstats"]["Exp"].Value = exp
else
newPlayer:SaveNumber("Exp",0)
end

-Bansey
Report Abuse
Bansey is not online. Bansey
Joined: 16 May 2008
Total Posts: 118
21 Aug 2011 01:22 AM
game.Players.Player:WaitForDataReady()
leaderstats = game.Players.Player:FindFirstChild("leaderstats")
if leaderstats then
game.Players.Player:SaveNumber("Gold",leaderstats["Gold"].Value)
game.Players.Player:SaveNumber("Exp",leaderstats["Exp"].Value)
end

game.Players.ChildAdded:connect(function(newPlayer)
newPlayer:WaitForDataReady()
gold = newPlayer:LoadNumber("Gold")
if gold then
newPlayer["leaderstats"]["Gold"].Value = gold
else
newPlayer:SaveNumber("Gold",0)
end
exp = newPlayer:LoadNumber("Exp")
if exp then
newPlayer["leaderstats"]["Exp"].Value = exp
else
newPlayer:SaveNumber("Exp",0)
end
end)

-Bansey
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
21 Aug 2011 10:39 AM
@tdog

1. The wiki isn't useless
2. Using DP tells him nothing if he doesn't even have the leaderboard set up which is what I redirected him to.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Aug 2011 11:09 AM
Well, do you know anything about IntValues?
Report Abuse
tdog158 is not online. tdog158
Joined: 08 Jul 2008
Total Posts: 5413
21 Aug 2011 11:28 AM
@SDuke, he asked how to save Gold from a leaderboard, not how to get a gold value on his leaderboard.
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
21 Aug 2011 11:29 AM
Well, from what I see, I don't think he can script very well at all. Redirection to a wiki page where he can learn what to do would actually be better then giving him the script, then him coming back when he needs to edit that script.
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
21 Aug 2011 05:25 PM
"he asked how to save Gold from a leaderboard, not how to get a gold value on his leaderboard."

"how can i add these to my upcoming rpg game?"

lrn2read
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Aug 2011 06:01 PM
@SDuke524
Are you making fun of Tdog?Because, Tdog is a really good guy :P
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