A Roblox Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

A Roblox Community

A community of Robloxians who want to learn to script and build on Roblox Studio.
 
HomeLatest imagesRegisterLog in
If you're a experienced coder make some tutorials! It would really help the site grow.
Make sure you read the rules(Which can be found by clicking here)
If you're a beginner at coding, try some tutorials.
We have many Moderators/Admins watching this site. Contact them with Questions.
Let us know what your favorite sport is. By clicking here to vote (Click here)
This site is becoming inactive. Lets make it active.
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Top posters
blueymaddog
Data Persistence Tutorial [ Numbers Saving ] Vote_lcapData Persistence Tutorial [ Numbers Saving ] Voting_barData Persistence Tutorial [ Numbers Saving ] Vote_rcap 
naknak
Data Persistence Tutorial [ Numbers Saving ] Vote_lcapData Persistence Tutorial [ Numbers Saving ] Voting_barData Persistence Tutorial [ Numbers Saving ] Vote_rcap 
Supernapalm
Data Persistence Tutorial [ Numbers Saving ] Vote_lcapData Persistence Tutorial [ Numbers Saving ] Voting_barData Persistence Tutorial [ Numbers Saving ] Vote_rcap 
m27frogy
Data Persistence Tutorial [ Numbers Saving ] Vote_lcapData Persistence Tutorial [ Numbers Saving ] Voting_barData Persistence Tutorial [ Numbers Saving ] Vote_rcap 
slayer9365
Data Persistence Tutorial [ Numbers Saving ] Vote_lcapData Persistence Tutorial [ Numbers Saving ] Voting_barData Persistence Tutorial [ Numbers Saving ] Vote_rcap 
myrco919
Data Persistence Tutorial [ Numbers Saving ] Vote_lcapData Persistence Tutorial [ Numbers Saving ] Voting_barData Persistence Tutorial [ Numbers Saving ] Vote_rcap 
branefreez
Data Persistence Tutorial [ Numbers Saving ] Vote_lcapData Persistence Tutorial [ Numbers Saving ] Voting_barData Persistence Tutorial [ Numbers Saving ] Vote_rcap 
ninga95
Data Persistence Tutorial [ Numbers Saving ] Vote_lcapData Persistence Tutorial [ Numbers Saving ] Voting_barData Persistence Tutorial [ Numbers Saving ] Vote_rcap 
CloneTrooper787
Data Persistence Tutorial [ Numbers Saving ] Vote_lcapData Persistence Tutorial [ Numbers Saving ] Voting_barData Persistence Tutorial [ Numbers Saving ] Vote_rcap 
raboy117
Data Persistence Tutorial [ Numbers Saving ] Vote_lcapData Persistence Tutorial [ Numbers Saving ] Voting_barData Persistence Tutorial [ Numbers Saving ] Vote_rcap 
Top posting users this month
No user
Latest topics
» Where to go from here.
Data Persistence Tutorial [ Numbers Saving ] EmptySeptember 14th 2020, 1:20 pm by MrNicNac

» Send me an Email
Data Persistence Tutorial [ Numbers Saving ] EmptySeptember 14th 2020, 1:16 pm by MrNicNac

» [v1.6.0.0] Lua Script Obfuscator [No Bytecode]
Data Persistence Tutorial [ Numbers Saving ] EmptyJuly 6th 2015, 7:38 pm by m27frogy

» New Site Possibly
Data Persistence Tutorial [ Numbers Saving ] EmptyJuly 6th 2015, 4:16 pm by m27frogy

» Ambassador!
Data Persistence Tutorial [ Numbers Saving ] EmptyApril 15th 2015, 11:40 pm by naknak

» Boop - Tag
Data Persistence Tutorial [ Numbers Saving ] EmptyApril 13th 2015, 9:46 pm by naknak

» Vip Class Script
Data Persistence Tutorial [ Numbers Saving ] EmptyApril 13th 2015, 4:54 pm by naknak

» Who's active?!
Data Persistence Tutorial [ Numbers Saving ] EmptyApril 13th 2015, 4:52 pm by naknak

» Genesis Point
Data Persistence Tutorial [ Numbers Saving ] EmptyJuly 17th 2014, 7:04 pm by branefreez

» Reward System
Data Persistence Tutorial [ Numbers Saving ] EmptyJuly 17th 2014, 5:41 am by m27frogy

» Script Request
Data Persistence Tutorial [ Numbers Saving ] EmptyJuly 10th 2014, 11:43 am by naknak

» local scripts?
Data Persistence Tutorial [ Numbers Saving ] EmptyJuly 10th 2014, 11:39 am by naknak

» Project: Reconstruction [Died]
Data Persistence Tutorial [ Numbers Saving ] EmptyJuly 10th 2014, 11:36 am by naknak

» Hi. I am new here
Data Persistence Tutorial [ Numbers Saving ] EmptyApril 26th 2014, 4:01 pm by altshiftkey

» What's your favorite sport?
Data Persistence Tutorial [ Numbers Saving ] EmptyJanuary 1st 2014, 2:13 pm by m27frogy

» FlashLight Script
Data Persistence Tutorial [ Numbers Saving ] EmptyJanuary 1st 2014, 2:11 pm by m27frogy

» Gun Making! [READ DESC]
Data Persistence Tutorial [ Numbers Saving ] EmptyJanuary 1st 2014, 2:10 pm by m27frogy

» Hi, I am new here!
Data Persistence Tutorial [ Numbers Saving ] EmptyNovember 26th 2013, 3:33 pm by Keanu73

» Improve Coding
Data Persistence Tutorial [ Numbers Saving ] EmptyOctober 26th 2013, 1:12 pm by pook03

» Simple Button
Data Persistence Tutorial [ Numbers Saving ] EmptySeptember 1st 2013, 6:19 pm by branefreez


 

 Data Persistence Tutorial [ Numbers Saving ]

Go down 
2 posters

Was this tutorial helpful?
Yes
Data Persistence Tutorial [ Numbers Saving ] Vote_lcap50%Data Persistence Tutorial [ Numbers Saving ] Vote_rcap
 50% [ 2 ]
No
Data Persistence Tutorial [ Numbers Saving ] Vote_lcap0%Data Persistence Tutorial [ Numbers Saving ] Vote_rcap
 0% [ 0 ]
Could have been better
Data Persistence Tutorial [ Numbers Saving ] Vote_lcap50%Data Persistence Tutorial [ Numbers Saving ] Vote_rcap
 50% [ 2 ]
Total Votes : 4
 

AuthorMessage
Guest
Guest
avatar



Data Persistence Tutorial [ Numbers Saving ] Empty
PostSubject: Data Persistence Tutorial [ Numbers Saving ]   Data Persistence Tutorial [ Numbers Saving ] EmptyJune 4th 2011, 3:15 pm

I created a tutorial on the main ROBLOX Website. I will be going through all of the need to know stuff in here.

First thing is Saving. You cant save progress unless a players Data has been loaded. There is a method to wait until the players Data is loaded. Although we have to start off with a more Basic line. This line is what triggers the function. Here us a Function which will trigger when a player leaves the game.

game.Players.PlayerRemoving:connect(function(player)

Now we must incorporate the line to wait until the players Data is ready

player:WaitForDataReady()

The next line is what you would like to save. In here we will be saving a players KOs value.

player:SaveNumber("KOs", player.leaderstats.KOs.Value)

Now as with all functions we need an end

end)

Here is the complete script:

game.Players.PlayerRemoving:connect(function(player)
player:WaitForDataReady()
player:SaveNumber("KOs", player.leaderstats.KOs.Value)
end)

The main line is line 3. Inside the brackets are arguments. The first argument is what you will save the Number as. The second argument is the value you are saving. In this case we are saving the value of Knock outs inside the leaderstats inside the player.

Please vote on the poll, I will use the results to improve future Tutorials
Back to top Go down
myrco919
Intermediate Scripter
Intermediate Scripter
myrco919


Posts : 190
Join date : 2011-01-21
Age : 26
Location : Holland

Data Persistence Tutorial [ Numbers Saving ] Empty
PostSubject: Re: Data Persistence Tutorial [ Numbers Saving ]   Data Persistence Tutorial [ Numbers Saving ] EmptyJune 27th 2011, 10:37 am

Could have been a little better, like also explaining the loading part and the sorts you can save/load. I.E Boolean/Number/String etc
Back to top Go down
blueymaddog
Administrator
Administrator
blueymaddog


Posts : 1081
Join date : 2010-12-09
Age : 26

Data Persistence Tutorial [ Numbers Saving ] Empty
PostSubject: Re: Data Persistence Tutorial [ Numbers Saving ]   Data Persistence Tutorial [ Numbers Saving ] EmptyNovember 20th 2011, 6:17 am

well explained! =D
Back to top Go down
Sponsored content





Data Persistence Tutorial [ Numbers Saving ] Empty
PostSubject: Re: Data Persistence Tutorial [ Numbers Saving ]   Data Persistence Tutorial [ Numbers Saving ] Empty

Back to top Go down
 
Data Persistence Tutorial [ Numbers Saving ]
Back to top 
Page 1 of 1
 Similar topics
-
» Data Persistence Explained
» Metatables Tutorial
» Tutorial on: 'for' loops
» Instance.new() tutorial
» Blueymaddog's Dialog NPC tutorial

Permissions in this forum:You cannot reply to topics in this forum
A Roblox Community :: Tutorials and Resources :: Intermediate-
Jump to: