When saving models, you would need to save multiple values to the datastore.
You would need to save the identifier of the model (some sort of clarification of which model you would need to fetch when loading), the model’s PrimaryPart’s XYZ position values and the XYZ of the PrimaryPart’s lookVector.
To implement this, simple add these values to a table / dictionary. You could use something similar to the following:
local Player = -- Pass the player to the function when saving.
local Datastore = game:GetService("DatastoreService"):GetDataStore("ModelData", "Version1")
local ModelData = {}
local Model = game.Workspace.Model
local PrimaryPart = Model.PrimaryPart
local PosVector = PrimaryPart.Position
local Direction = PrimaryPart.lookVector
ModelData.ModelName = Model.Name -- In this example this is unnecessary; however, you would need it for your system.
ModelData.Position = {PosVector.x, PosVector.y, PosVector.z, Direction.X, Direction.Y, Direction.Z}
Datastore:SetAsync(Player.UserId ,ModelData)
For loading, you can just unpack the data using the following.
local Player = -- Passed to the function.
local Datastore = game:GetService("DatastoreService"):GetDataStore("ModelData", "Version1")
local ModelData = Datastore:GetAsync(Player.UserId)
local TargetModel = game.Workspace.Model -- You can use ModelData.ModelName if this is located differently / for multiple models.
local Information = ModelData.Position
local NewModel = TargetModel:Clone()
local Position = Vector3.new(Information[1], Information[2], Information[3])
local lookVector = Vector3.new(Information[4], Information[5], Information[6])
NewModel:SetPrimaryPartCFrame(Position, Position + (lookVector * 5))
NewModel.Parent = game.Workspace
To save a series of models, you could do the same; however, use a for loop which adds the ModelData to a main table and then save that main table.
You will need to modify this script; however, it should provide a good outline for what you’re aiming to achieve.