PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

PasteRegion

Applies a chunk of terrain to the Terrain object. Note: TerrainRegion data does not replicate between server and client.

Parameters

Name Type Default Description

Returns

Return Type Summary

Code Samples


Terrain:PasteRegion

The following code will copy the whole Terrain and clear it. After 5 seconds it will paste the terrain back.

local terrainRegion = workspace.Terrain:CopyRegion(workspace.Terrain.MaxExtents)
workspace.Terrain:Clear()
wait(5)
local corner = Vector3int16.new(-32000, -32000, -32000)
local pasteEmptyRegion = false
workspace.Terrain:PasteRegion(terrainRegion, corner, pasteEmptyRegion)