--[[
-- превращаем блоки в ландшафт
game.Workspace.Terrain:FillBlock(game.Workspace.Part1.CFrame, game.Workspace.Part1.Size, Enum.Material.Metal)
game.Workspace.Terrain:FillBlock(game.Workspace.Part2.CFrame, game.Workspace.Part2.Size, Enum.Material.Water)
game.Workspace.Terrain:FillBlock(game.Workspace.Part3.CFrame, game.Workspace.Part3.Size, Enum.Material.Grass)

-- убираем блоки
game.Workspace.Part1.Parent=nil
game.Workspace.Part2.Parent=nil
game.Workspace.Part3.Parent=nil


-- производим замену ландшафта
local region = Region3.new(Vector3.new(-20,-20,-80), Vector3.new(20,10,-60))
region = region:ExpandToGrid(4)
-- чтение
local material, occupancy = game.Workspace.Terrain:ReadVoxels(region, 4)
local size = material.Size
for x = 1, size.X do
	for y = 1, size.Y do
		for z = 1, size.Z do
			print("Material at (", x, y, z, "): ", material[x][y][z])
			material[x][y][z] = Enum.Material.Water
			print("Occupancy at (", x, y, z, "): ", occupancy[x][y][z])
		end
	end
end
-- запись
game.Workspace.Terrain:WriteVoxels(region, 4, material, occupancy)
]]
--
