Problem with copy or pasting terrain

so I wanna copy and paste terrain region but it doesn’t seem to be working.
this is the region3in16 value I plug into the copy region function: -3103, 347, 928; -2880, 544, 1099
(I printed it)
Here’s the actual code

task.wait(10)
local minPos = game.Workspace.umumumuTerrainPositions.minimumPart.Position
local maxPos = game.Workspace.umumumuTerrainPositions.maximumPart.Position
local umumumuRegion = workspace.Terrain:CopyRegion(Region3int16.new(Vector3int16.new(minPos.X, minPos.Y, minPos.Z), Vector3int16.new(maxPos.X, maxPos.Y, maxPos.Z)))
task.wait(.1)
print("saved all, clearing")
task.wait(1)
workspace.Terrain:Clear()
task.wait(10)
local minPos = game.Workspace.unknownPlanetTerrainPositions.minimumPart.Position
workspace.Terrain:PasteRegion(umumumuRegion,  Vector3int16.new(minPos.X, minPos.Y, minPos.Z), true)
print("worked!")

No errors, just doesn’t work. yes the terrain corner parts for the region3 is anchored.
it prints “worked!”, but I don’t see anything around the minimumPart Position. yes, this is
Less than 512,512,512 vector3. if you have any info on why this doesn’t work pls comment!! thank u

1 Like

Just as a check, but what happens if you switch what you call the minimum Part and maximum Part’s Positions. Just wondering if it’s not calculating because the script is seeing different values than what you’d expect.

Or just print minPos.X, minPos.Y, minPos.Z and maxPos.X, maxPos.Y, maxPos.Z to see if you’re getting actual values.

okay Im gonna test those out and show results

okay, so I printed 3103, 347, 928 -2880, 544, 1099. I switched the position of minimum and maximum and nothing happened

I divided each coordinate by 4 and it works fine now! thanks for the help

Ah brilliant!
I didn’t know you were talking studs (Parts) instead of voxels (Terrain).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.