Terrain copying and pasting through script

I am working on a game; in this game each team (3) will have a base made out of terrain, along with the main map which will be made of terrain which they can dig into etc.

When the game starts, I am attempting to save each terrain area separately. This way, when a round is over, I can simply call on the Module and regenerate the main map, and I can also regenerate the bases during the game.

The terrain clears, however, when the paste is running it doesn’t add any terrain. Am I doing something wrong?

local mapRegion = Region3int16.new(Vector3int16.new(1512, -249, -1513), Vector3int16.new(-1515, 157, 1511))
local mapTerrain = workspace.Terrain:CopyRegion(mapRegion) --min,max

function Functions:LoadMapTerrain()
	--workspace.Terrain:PasteRegion(terrainRegion, corner, pasteEmptyRegion)
1 Like

Change this

To this

local mapRegion = Region3int16.new(Vector3int16.new(-1512, -249, -1513), Vector3int16.new(1515, 157, 1511))
1 Like

It keeps pasting in terrain from outside the positions, why do you think it’s doing that?

I positioned some terrain super far away and it didn’t, but if it is nearby it seems to be copying it as well, even when it isn’t within the bounds of the points I listed.