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
 

Re: how 2 use data storage 2 save bricks

Previous Thread :: Next Thread 
Kervos is not online. Kervos
Joined: 27 Aug 2015
Total Posts: 322
28 Sep 2016 05:18 PM
I'm new to data storage and i recently just learned about data storage on wiki but it only taught me how 2 save stats/currency, but how do u save bricks?

such as

-welded clothes (specific cframe/placement)
-houses
-parts
Report Abuse
Kervos is not online. Kervos
Joined: 27 Aug 2015
Total Posts: 322
01 Oct 2016 01:11 AM
yea bump still haven't found my answer
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
01 Oct 2016 01:11 AM
Save the needed properties.
Report Abuse
Kervos is not online. Kervos
Joined: 27 Aug 2015
Total Posts: 322
01 Oct 2016 01:13 AM
## like, cframe, colors, etc? can u guide me on how to ### that on a data storage script too? sorry if I'm asking a lot
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
01 Oct 2016 01:17 AM
For CFrames you can save each component in a table:
local t = {cframe:components()}

For BrickColors you can store the name.
See the wiki if you need help on how data stores work.

Report Abuse
jody7777 is not online. jody7777
Joined: 22 Feb 2009
Total Posts: 1343
01 Oct 2016 01:27 AM
serialize the brick (properties and stuff), then when you load back just take the properties in a table and re-construct it


FOR THE CAUSE
Report Abuse
Milenveliki is not online. Milenveliki
Joined: 14 Aug 2013
Total Posts: 1097
01 Oct 2016 01:42 AM
?Player:SaveInstance()
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
01 Oct 2016 02:02 AM
local PartsData = {
Part1 = {
Class = 'BasePart',
Size = {x = 1,y = 0,z = 1}
CFrame = {x,y,z,R00,R01,R02,R10,R11,R12,R20,R21,R22},
BrickColor = 'Bright red',
Anchored = true,
...
},
}'

ds:SetAsync('GlobalPartsData',PartsData}


Report Abuse
VilgO is not online. VilgO
Joined: 15 Feb 2011
Total Posts: 518
01 Oct 2016 03:44 AM
The general idea is that you save the data you'll need when you'll decide to recreate the bricks. Serialization is straightforward, but you can write your own function that turns a brick into a table with whatever data you want to save.
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