I have a game I'm making which needs multiple copies of an identical section of terrain to be created via script. Is there a way to have a separate terrain object in ServerStorage to be cloned, or to copy/paste a section of terrain using scripts? Or would I have to dynamically create each section as needed?
local region=Region3.new(Vector3.new(0,-50,0), Vector3.new(100,2,100)):ExpandToGrid(4)
local Terrain=workspace.Terrain
Terrain:FillRegion(
region,4,Enum.Material.Slate
)
local material,occupancy=Terrain:ReadVoxels(region,4)do
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])
print("Occupancy at (", x, y, z, "): ", occupancy[x][y][z])
end
end
end
end