Hello, I'm working on a game with a rust like placement system and I wanted to know if it was possible to save structures or objects in datastore? Thanks for your time. - Zeta
In the Roblox Datastore, you can only save datatypes such as Integers, Numbers, Strings, Booleans, and Tables.
If you don't know what these are go here: http://wiki.roblox.com/index.php?title=Data_types
In order to save a model, you would likely want it's position, rotation, and what it is. All the extra attributes such as customization can also be saved, but those are the main three.
For each model in your game you should have a PrimaryPart, this is not required, but makes it much easier. Therefore if you do have a PrimaryPart, you would save the following:
local pos = tostring(Model.PrimaryPart.Position) -- Can't save the position since it is a Vector3 value local rot = tostring(Model.PrimaryPart.Orientation) -- Same here, Vector3 value local Type = Model.Name
You can insert all of these into a table and attach it to the player's key in the datastore.
So when you load it, you would get the type of model saved, and clone it from a storage place. You would then do setPrimaryPartCFrame and set the position and rotation.