World saving system help

Hello i have a question how would i be able to make a world saving system like you have a gui you can save here and load and bam you have a plot saving system?

if you have any tutorial or something just reply

thank you!

you probaly need to use replicated storage to storage the world data since its for only clients.

ummm i can try something like that

It’s very simple

  1. For each BasePart, save all the relevant information used to define it (cframe, color, etc.) in DataStore
  2. When you want to load the Parts, take the data and construct a new BasePart and apply the attributes
  3. Do for each saved BasePart
  4. Done.

but for exemple if i have model insted of part what do i do?

get all children of the model and save it “for example”

for i, Parts in pairs(ModelHere:GetChildren()) do
--do what you want here
end

You can save the BaseParts in the hierarchy that they are in as Instances.

For example if you have a hierarchy like so:
image

You can denote the Instance in a table which can be saved

table to save
local World = {
	Moose = {
		attributes = {
			type = "Model"	
		},
		children = {
			Part1 = {
				attributes = {
					type = "Part",
					cframe = {0,0,0,0,0,0,0,0,0,0,0,0}
				},
				children = {}
			},
			Part2 = {
				attributes = {
					type = "Part",
					cframe = {0,0,0,0,0,0,0,0,0,0,0,0}
				},
				children = {}
			}
		}
	}
}

Important:

Don’t save information you already know. If you have the size and shape of a BasePart because it’s stored in ReplicatedStorage in each game, all you do is save the name of the Part (names must be unique) and information that you don’t know like CFrame.

Then when you go to load it, you just find the Part with that name in ReplicatedStorage and clone it and place it where the saved cframe is.

example
-- save
local SavedPart = {
   Name  = "GoodPart",
   CFrame = {0,0,0}
}

-- load 
local NewPart = ReplicatedStorage[SavedPart.Name]:Clone()
NewPart.CFrame = CFrame.new(SavedPart.CFrame[1],SavedPart.CFrame[2],SavedPart.CFrame[3])