Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I save parts in datastore?

Asked by 4 years ago

So for example, I have a building system. I don't know how to save these to the cloud. Could someone please explain how to use datastores for this?

0
you actually can't, bloxburg probably saves values and positions for the objects, you can't save objects AnasBahauddin1978 715 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Datastores will only allow you to save simple values like numbers, bools, and strings. Since they cannot save complex values like a BasePart, we extract all the properties we need to remember from the part and save them into arrays of stings/numbers. When loading a saved building, we take the array of properties received from the datastore and put them into objects. This process is called "Serialization" and you can learn more about it here:

https://devforum.roblox.com/t/how-to-save-parts-and-the-idea-of-serialization/524311/3

Ad

Answer this question