function MapManager.SaveMap(n)for n,D in ipairs(workspace:GetChildren())do if not D:IsA("\067\097\109\101\114\097")and(not D:IsA("\084\101\114\114\097\105\110")and not D:IsA("\070\111\108\100\101\114"))then local n=D:Clone()if n then n.Parent=MapSave end end end end function MapManager.ClearMap(n)for n,D in ipairs(workspace:GetChildren())do if not D:IsA("\067\097\109\101\114\097")and(not D:IsA("\084\101\114\114\097\105\110")and not D:IsA("\070\111\108\100\101\114"))then D:Destroy()end end end function MapManager.LoadMap(n)spawn(function()for n,D in ipairs(MapSave:GetChildren())do local i=D:Clone()i.Parent=workspace end end)end return MapManager
-- Functions

function MapManager:SaveMap()
	for _, child in ipairs(workspace:GetChildren()) do
		if not child:IsA("Camera") and not child:IsA("Terrain") and not child:IsA("Folder") then
			local copy = child:Clone()
			if copy then
				copy.Parent = MapSave
			end
		end
	end
end

function MapManager:ClearMap()
	for _, child in ipairs(workspace:GetChildren()) do
		if not child:IsA("Camera") and not child:IsA("Terrain") and not child:IsA("Folder") then
			child:Destroy()
		end
	end
end

function MapManager:LoadMap()
	spawn(function()
		for _, child in ipairs(MapSave:GetChildren()) do
			local copy = child:Clone()
			copy.Parent = workspace
		end
	end)
end

return MapManager
