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
|
  |
| Joined: 27 Aug 2015 |
| Total Posts: 322 |
|
|
| 01 Oct 2016 01:11 AM |
| yea bump still haven't found my answer |
|
|
| Report Abuse |
|
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 01 Oct 2016 01:11 AM |
| Save the needed properties. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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 |
|
|
| |
|
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
|
  |
| 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 |
|
|