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: How do I find a Player's saved data?

Previous Thread :: Next Thread 
kungfuman32 is not online. kungfuman32
Joined: 12 Dec 2008
Total Posts: 9172
16 Oct 2012 10:14 PM
I am using a levelup system I made and I want to know where the data saves and if so can I edit it?
Report Abuse
L2000 is not online. L2000
Joined: 03 Apr 2008
Total Posts: 77448
16 Oct 2012 10:17 PM
When you save, you need to give it the name and value; you can find it using the name specified. So if you have this:

player:SaveNumber("Name", value)

Then you can load it using:

player:LoadNumber("Name")

And then editing is simple; every time you want to change it, just use player:SaveNumber() again.
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
16 Oct 2012 10:23 PM
The way I've always assumed DataPersistence works is that, when the Player leaves the game, their Data for that game is cleared, and any new Data is saved over it.

It warrants a test, but this seems like the most obvious implementation to me, as there is no way to actually clear the Data.
Report Abuse
kungfuman32 is not online. kungfuman32
Joined: 12 Dec 2008
Total Posts: 9172
16 Oct 2012 10:24 PM
^^
Yes I am trying to clear data for a game I am making.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
16 Oct 2012 10:26 PM
Basically, data is saved to the server for each player, and this data is NOT cleared when the player leaves (hence, persistence). The data stays saved until it is rewritten (or a place is reset maybe? that needs testing).
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
16 Oct 2012 10:29 PM
Just do a quick test:

Saving Bool1 and Bool2.

Join game. Bool1 can't be loaded, save Bool1 but not Bool2. Leave game.
Join game. Bool1 can be loaded, but not Bool2. Save both. Leave game.
Join game. Both Bool1 and Bool2 can be loaded, only save Bool2. Leave game.


If it repeatedly loops, my hypothesis is correct.
Report Abuse
kungfuman32 is not online. kungfuman32
Joined: 12 Dec 2008
Total Posts: 9172
16 Oct 2012 10:30 PM
Alright let me test this theory.
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
16 Oct 2012 10:31 PM
@AF,

I meant, the Data gets cleared on the C side when PlayerRemoving would fire, and then whatever new data is getting saved would be saved.

Add to my test: Get to where both Bool1 and Bool2 are saved. Reset the game to a baseplate, join it, leave it, set it back to the previous version. Are both still saved?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Oct 2012 11:20 PM
Is this what you're trying to do?

whiel true and wait() do
for i, v in pairs(game.Players:GetChilren()) do
if v:LoadNumber("Name") == nil then
v:SaveNumber("Name", Val)
end
end
end
Report Abuse
pugzy is not online. pugzy
Joined: 16 Aug 2007
Total Posts: 11957
17 Oct 2012 12:02 AM
How do they make their data persistent?
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