# Terrain

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [BasePart](https://rapi.sleaze.dev/classes/BasePart.md), [PVInstance](https://rapi.sleaze.dev/classes/PVInstance.md), [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/Terrain/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/Terrain

[`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) lets you to create dynamically morphable environments.

## Properties

### Decoration

```luau
Terrain.Decoration: boolean = false
```

- Tags: Not scriptable, Capabilities: Environment

Enables or disables terrain decoration.

### GrassLength

```luau
Terrain.GrassLength: number = 0.699999988
```

- Tags: Not scriptable, Capabilities: Environment

Specifies the length of animated grass.

### MaterialColors

```luau
Terrain.MaterialColors: string = ""
```

- Tags: Not scriptable, Capabilities: Environment

Represents the editor for the **Material Color** feature and cannot be edited by scripts.

### Materials

```luau
Terrain.Materials: SharedString
```

- Tags: Hidden, Not scriptable, Capabilities: Environment

### SmoothVoxelsUpgraded

```luau
Terrain.SmoothVoxelsUpgraded: boolean = false
```

- Tags: Hidden, Roblox script security, Read capabilities: Environment

### WaterColor

```luau
Terrain.WaterColor: Color3 = Color3.new(0.05, 0.33, 0.36)
```

- Tags: Capabilities: Environment

The tint of [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) water.

### WaterReflectance

```luau
Terrain.WaterReflectance: number = 1
```

- Tags: Capabilities: Environment

Controls how opaque [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) water reflections are.

### WaterTransparency

```luau
Terrain.WaterTransparency: number = 0.300000012
```

- Tags: Capabilities: Environment

The transparency of [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) water.

### WaterWaveSize

```luau
Terrain.WaterWaveSize: number = 0.150000006
```

- Tags: Capabilities: Environment

Sets the maximum height of [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) water waves in studs.

### WaterWaveSpeed

```luau
Terrain.WaterWaveSpeed: number = 10
```

- Tags: Capabilities: Environment

Sets how many times [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) water waves will move up and down per minute.

### ExpandedTerrainResolved

```luau
Terrain.ExpandedTerrainResolved: boolean = false
```

- Tags: Hidden, Read: Roblox script security, Write: Roblox engine security, Read capabilities: Environment

### AcquisitionMethod

```luau
Terrain.AcquisitionMethod: Enum.TerrainAcquisitionMethod = Enum.TerrainAcquisitionMethod.None
```

- Tags: Hidden, Not scriptable, Roblox script security, Read capabilities: Environment

### ClusterGrid

```luau
Terrain.ClusterGrid: string
```

- Tags: Hidden, Not replicated, Not scriptable, Write only, Read capabilities: Environment, Load only

### ClusterGridV2

```luau
Terrain.ClusterGridV2: string
```

- Tags: Hidden, Not replicated, Not scriptable, Write only, Read capabilities: Environment, Load only

### ClusterGridV3

```luau
Terrain.ClusterGridV3: string
```

- Tags: Hidden, Not replicated, Not scriptable, Write only, Read capabilities: Environment, Load only

### LastUsedModificationMethod

```luau
Terrain.LastUsedModificationMethod: Enum.TerrainAcquisitionMethod = Enum.TerrainAcquisitionMethod.None
```

- Tags: Hidden, Not replicated, Roblox script security, Read capabilities: Environment

### MaxExtents

```luau
Terrain.MaxExtents: Region3int16
```

- Tags: Read only, Capabilities: Environment

Displays the boundaries of the largest possible editable region.

### PhysicsGrid

```luau
Terrain.PhysicsGrid: string = "\u0002\u0003"
```

- Tags: Hidden, Not replicated, Not scriptable, Read capabilities: Environment

### SmoothGrid

```luau
Terrain.SmoothGrid: string = ""
```

- Tags: Hidden, Not replicated, Not scriptable, Read capabilities: Environment

### VoxelGridAssetContentMap

```luau
Terrain.VoxelGridAssetContentMap: AssetContentMap
```

- Tags: Hidden, Not replicated, Not scriptable, Roblox script security, Read capabilities: Environment

### IsSmooth

```luau
Terrain.IsSmooth: boolean = true
```

- Tags: Deprecated, Read only, Read capabilities: Environment

**Deprecated:** The legacy terrain engine has been removed, so this property will always be `true`.

Returns `true` if the game is using the smooth terrain system.

## Methods

### CanSmoothVoxelsBeUpgraded

```luau
Terrain:CanSmoothVoxelsBeUpgraded(): boolean
```

- Tags: Roblox script security, Capabilities: Environment

### CellCenterToWorld

```luau
Terrain:CellCenterToWorld(x: number, y: number, z: number): Vector3
```

- Tags: Capabilities: Environment

Returns the world position of the center of the terrain cell.

Parameters:

- `x`: The X coordinate of the terrain cell in grid space.
- `y`: The Y coordinate of the terrain cell in grid space.
- `z`: The Z coordinate of the terrain cell in grid space.

Returns: The world-space [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) position at the center of the specified cell.

### CellCornerToWorld

```luau
Terrain:CellCornerToWorld(x: number, y: number, z: number): Vector3
```

- Tags: Capabilities: Environment

Returns the position of the lower-left-forward corner of the grid cell.

Parameters:

- `x`: The X coordinate of the terrain cell in grid space.
- `y`: The Y coordinate of the terrain cell in grid space.
- `z`: The Z coordinate of the terrain cell in grid space.

Returns: The world-space [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) position of the lower-left-forward corner of the specified cell.

### Clear

```luau
Terrain:Clear()
```

- Tags: Capabilities: Environment

Clears all terrain.

### ClearVoxelsAsync_beta

```luau
Terrain:ClearVoxelsAsync_beta(region: Region3, channelIds: { any })
```

- Tags: Custom Lua state, Capabilities: Environment

### CopyRegion

```luau
Terrain:CopyRegion(region: Region3int16): TerrainRegion
```

- Tags: Capabilities: Environment

Stores a chunk of terrain into a [`TerrainRegion`](https://rapi.sleaze.dev/classes/TerrainRegion.md) object so it can be loaded back later.

Parameters:

- `region`: The [`Region3int16`](https://rapi.sleaze.dev/index/types/Region3int16.md) defining the area of terrain to copy, in cell coordinates.

Returns: A [`TerrainRegion`](https://rapi.sleaze.dev/classes/TerrainRegion.md) containing the copied voxel data from the specified region.

### CountCells

```luau
Terrain:CountCells(): number
```

- Tags: Capabilities: Environment

Returns the number of non-empty cells in the terrain.

Returns: The approximate number of non-empty terrain cells.

### CreateVoxelBuffer_beta

```luau
Terrain:CreateVoxelBuffer_beta(): VoxelBuffer
```

- Tags: Roblox script security, Capabilities: Environment

### DrawBufferAsync

```luau
Terrain:DrawBufferAsync(cframe: CFrame, scale: number, resolution: number, source: VoxelBuffer, mergeConfig: { [string]: any })
```

- Tags: Yields, Roblox script security, Capabilities: Environment

### FillBall

```luau
Terrain:FillBall(center: Vector3, radius: number, material: Enum.Material)
```

- Tags: Capabilities: Environment

Fills a ball of smooth terrain in a given space.

Parameters:

- `center`: The position of the center of the terrain ball.
- `radius`: The radius in studs of the terrain ball.
- `material`: The [`Material`](https://rapi.sleaze.dev/classes/BasePart.md) of the terrain ball.

### FillBallSlot

```luau
Terrain:FillBallSlot(center: Vector3, radius: number, solidMaterialIndex: number)
```

- Tags: Roblox script security, Capabilities: Environment

### FillBlock

```luau
Terrain:FillBlock(cframe: CFrame, size: Vector3, material: Enum.Material)
```

- Tags: Capabilities: Environment

Fills a block of smooth terrain with a given location, rotation, size, and material.

Parameters:

- `cframe`: The position and orientation of the terrain block.
- `size`: The size in studs of the square block (both the height and width).
- `material`: The [`Material`](https://rapi.sleaze.dev/classes/BasePart.md) of the terrain block.

### FillBlockSlot

```luau
Terrain:FillBlockSlot(cframe: CFrame, size: Vector3, solidMaterialIndex: number)
```

- Tags: Roblox script security, Capabilities: Environment

### FillCylinder

```luau
Terrain:FillCylinder(cframe: CFrame, height: number, radius: number, material: Enum.Material)
```

- Tags: Capabilities: Environment

Fills a cylinder of smooth terrain in a given space.

Parameters:

- `cframe`: The position and orientation of the terrain cylinder.
- `height`: The height in studs of the terrain cylinder.
- `radius`: The radius in studs of the terrain cylinder.
- `material`: The [`Material`](https://rapi.sleaze.dev/classes/BasePart.md) of the terrain cylinder.

### FillCylinderSlot

```luau
Terrain:FillCylinderSlot(cframe: CFrame, height: number, radius: number, solidMaterialIndex: number)
```

- Tags: Roblox script security, Capabilities: Environment

### FillRegion

```luau
Terrain:FillRegion(region: Region3, resolution: number, material: Enum.Material)
```

- Tags: Capabilities: Environment

Fills a [`Region3`](https://rapi.sleaze.dev/index/types/Region3.md) space with smooth terrain.

Parameters:

- `region`: The [`Region3`](https://rapi.sleaze.dev/index/types/Region3.md) to fill, which must be aligned to the voxel grid.
- `resolution`: The voxel resolution; must be exactly `4`.
- `material`: The [`Material`](https://rapi.sleaze.dev/classes/BasePart.md) to fill the region with.

### FillRegionSlot

```luau
Terrain:FillRegionSlot(region: Region3, resolution: number, solidMaterialIndex: number)
```

- Tags: Roblox script security, Capabilities: Environment

### FillWedge

```luau
Terrain:FillWedge(cframe: CFrame, size: Vector3, material: Enum.Material)
```

- Tags: Capabilities: Environment

Fills a wedge-shaped volume of terrain with the given [`Material`](https://rapi.sleaze.dev/classes/BasePart.md).

Parameters:

- `cframe`: The position and orientation of the wedge to fill.
- `size`: The size of the wedge to fill.
- `material`: The material with which the wedge will be filled.

### FillWedgeSlot

```luau
Terrain:FillWedgeSlot(cframe: CFrame, size: Vector3, solidMaterialIndex: number)
```

- Tags: Roblox script security, Capabilities: Environment

### GenerateWaterFlowMap

```luau
Terrain:GenerateWaterFlowMap(generateFoam: boolean)
```

- Tags: Roblox script security, Capabilities: Environment

### GetMaterialColor

```luau
Terrain:GetMaterialColor(material: Enum.Material): Color3
```

- Tags: Thread safe, Capabilities: Environment

Returns current terrain material color for specified terrain material.

Parameters:

- `material`: The [`Material`](https://rapi.sleaze.dev/classes/BasePart.md) whose terrain color to retrieve.

Returns: The [`Color3`](https://rapi.sleaze.dev/index/types/Color3.md) representing the current color tint of the specified material.

### GetMaterialSlot

```luau
Terrain:GetMaterialSlot(slotIndex: number): ...any
```

- Tags: Capabilities: Environment

### GetTerrainWireframe

```luau
Terrain:GetTerrainWireframe(cframe: CFrame, size: Vector3): { any }
```

- Tags: Roblox script security, Capabilities: Environment

### IsMaterialSlotInvalid

```luau
Terrain:IsMaterialSlotInvalid(slotIndex: number): boolean
```

- Tags: Roblox script security, Capabilities: Environment

### IterateVoxelsAsync_beta

```luau
Terrain:IterateVoxelsAsync_beta(region: Region3, resolution: number, channelIds: { any }): TerrainIterateOperation
```

- Tags: Custom Lua state, Capabilities: Environment

### ModifyVoxelsAsync_beta

```luau
Terrain:ModifyVoxelsAsync_beta(region: Region3, resolution: number, channelIds: { any }): TerrainModifyOperation
```

- Tags: Custom Lua state, Capabilities: Environment

### PasteRegion

```luau
Terrain:PasteRegion(region: TerrainRegion, corner: Vector3int16, pasteEmptyCells: boolean)
```

- Tags: Capabilities: Environment

Applies a chunk of terrain to the [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) object.

Parameters:

- `region`: The [`TerrainRegion`](https://rapi.sleaze.dev/classes/TerrainRegion.md) to paste, previously obtained from [`Terrain:CopyRegion()`](https://rapi.sleaze.dev/classes/Terrain.md).
- `corner`: The [`Vector3int16`](https://rapi.sleaze.dev/index/types/Vector3int16.md) cell coordinate at which to place the lower-left-forward corner of the region.
- `pasteEmptyCells`: Whether to overwrite existing terrain with empty (air) cells from the region.

### ReadBufferAsync

```luau
Terrain:ReadBufferAsync(region: Region3, resolution: number): VoxelBuffer
```

- Tags: Yields, Roblox script security, Capabilities: Environment

### ReadVoxelChannels

```luau
Terrain:ReadVoxelChannels(region: Region3, resolution: number, channelIds: { any }): { [string]: any }
```

- Tags: Custom Lua state, Thread safe, Capabilities: Environment

Returns a region of terrain voxel data in table format based on the channel names.

Parameters:

- `region`: Target region to read from. Must be aligned to the voxel grid. Will throw an error if region is too large; limit is currently 4194304 voxels³.
- `resolution`: Voxel resolution. Must be 4.
- `channelIds`: Array of channel IDs (strings) that need to be accessed from the voxel data. Each channel ID represents a type of data that's stored in voxel. Current supported IDs are `{"SolidMaterial", "SolidOccupancy", "LiquidOccupancy"}`.

Returns: Returns voxel data as a dictionary based on the `channelIds` input. Keys represent each channel ID with their respective value as an array of 3D data.

- `SolidMaterial` — The [`Material`](https://rapi.sleaze.dev/classes/BasePart.md) material of the voxel. Note that `Water` is not supported anymore; instead, a voxel that contains water will have a value of `LiquidOccupancy`.
- `SolidOccupancy` — The occupancy of the voxel's material as specified in the `SolidMaterial` channel. This is a value between 0 (empty) and 1 (full).
- `LiquidOccupancy` — Specifies the occupancy of the `Water` material in a voxel as a value between 0 (no water) and 1 (full of water). If the `SolidOccupancy` is 1 and the `SolidMaterial` is not `Air`, this will be 0.

 The dictionary also contains a [`Size`](https://rapi.sleaze.dev/classes/BasePart.md) key with a value representing the 3D array size of each channel data.

### ReadVoxels

```luau
Terrain:ReadVoxels(region: Region3, resolution: number): ...any
```

- Tags: Custom Lua state, Thread safe, Capabilities: Environment

Returns a certain region of smooth terrain in table format.

Parameters:

- `region`: Target region to read from. Must be aligned to the voxel grid. Will throw an error if region is too large. The limit is currently 4194304 voxels³.
- `resolution`: Voxel resolution. Must be `4`.

Returns: Returns raw voxel data as two 3D arrays.

- `materials` - 3D array of [`Material`](https://rapi.sleaze.dev/classes/BasePart.md) from the target area. Also contains a Size field, equal to the dimensions of the nested arrays.
- `occupancies` - 3D array of occupancy values from the target area. Also contains a Size field, equal to the dimensions of the nested arrays.

### ReadVoxelsAsync_beta

```luau
Terrain:ReadVoxelsAsync_beta(region: Region3, resolution: number, channelIds: { any }): TerrainReadOperation
```

- Tags: Custom Lua state, Capabilities: Environment

### ReplaceMaterial

```luau
Terrain:ReplaceMaterial(region: Region3, resolution: number, sourceMaterial: Enum.Material, targetMaterial: Enum.Material)
```

- Tags: Capabilities: Environment

Replaces the terrain of a material within a region with another material.

Parameters:

- `region`: The region in which the replacement operation will occur.
- `resolution`: The resolution at which the replacement operation will take place; at the moment this must be exactly `4`.
- `sourceMaterial`: The old material that shall be replaced.
- `targetMaterial`: The new material.

### ReplaceMaterialInTransform

```luau
Terrain:ReplaceMaterialInTransform(cframe: CFrame, size: Vector3, sourceMaterial: Enum.Material, targetMaterial: Enum.Material)
```

- Tags: Roblox script security, Capabilities: Environment

### ReplaceMaterialInTransformSubregion

```luau
Terrain:ReplaceMaterialInTransformSubregion(cframe: CFrame, size: Vector3, sourceMaterial: Enum.Material, targetMaterial: Enum.Material, targetRegion: Region3int16)
```

- Tags: Roblox script security, Capabilities: Environment

### ReplaceMaterialInTransformSubregionSlot

```luau
Terrain:ReplaceMaterialInTransformSubregionSlot(cframe: CFrame, size: Vector3, sourceMaterialIndex: number, targetMaterialIndex: number, targetRegion: Region3int16)
```

- Tags: Roblox script security, Capabilities: Environment

### ResetMaterialSlot

```luau
Terrain:ResetMaterialSlot(slotIndex: number)
```

- Tags: Capabilities: Environment

### ResetWaterFlowMap

```luau
Terrain:ResetWaterFlowMap()
```

- Tags: Roblox script security, Capabilities: Environment

### SetMaterialColor

```luau
Terrain:SetMaterialColor(material: Enum.Material, value: Color3)
```

- Tags: Capabilities: Environment

Sets current terrain material color for specified terrain material.

Parameters:

- `material`: The [`Material`](https://rapi.sleaze.dev/classes/BasePart.md) whose terrain color to change.
- `value`: The [`Color3`](https://rapi.sleaze.dev/index/types/Color3.md) to apply as the new color tint for the material.

### SetMaterialInTransform

```luau
Terrain:SetMaterialInTransform(cframe: CFrame, size: Vector3, targetMaterial: Enum.Material)
```

- Tags: Roblox script security, Capabilities: Environment

### SetMaterialInTransformSubregion

```luau
Terrain:SetMaterialInTransformSubregion(cframe: CFrame, size: Vector3, targetMaterial: Enum.Material, targetRegion: Region3int16)
```

- Tags: Roblox script security, Capabilities: Environment

### SetMaterialInTransformSubregionSlot

```luau
Terrain:SetMaterialInTransformSubregionSlot(cframe: CFrame, size: Vector3, targetMaterialIndex: number, targetRegion: Region3int16)
```

- Tags: Roblox script security, Capabilities: Environment

### SetMaterialSlot

```luau
Terrain:SetMaterialSlot(slotIndex: number, baseMaterial: Enum.Material, materialVariant: string, color: Color3)
```

- Tags: Capabilities: Environment

### SmoothRegion

```luau
Terrain:SmoothRegion(region: Region3, resolution: number, strength: number): ...any
```

- Tags: Custom Lua state, Roblox script security, Thread safe, Capabilities: Environment

### SmoothRegionMaterialSlots

```luau
Terrain:SmoothRegionMaterialSlots(region: Region3, resolution: number, strength: number): ...any
```

- Tags: Custom Lua state, Roblox script security, Thread safe, Capabilities: Environment

### WorldToCell

```luau
Terrain:WorldToCell(position: Vector3): Vector3
```

- Tags: Capabilities: Environment

Returns the grid cell location that contains the position point.

Parameters:

- `position`: The world-space [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) to convert to a cell coordinate.

Returns: A [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) representing the grid cell coordinates containing the given position.

### WorldToCellPreferEmpty

```luau
Terrain:WorldToCellPreferEmpty(position: Vector3): Vector3
```

- Tags: Capabilities: Environment

Returns the grid cell location that contains the position point, preferring empty grid cells when position is on a grid edge.

Parameters:

- `position`: The world-space [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) to convert to a cell coordinate.

Returns: A [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) representing the grid cell coordinates, biased toward an empty (air) neighbor when the position lies on a cell boundary.

### WorldToCellPreferSolid

```luau
Terrain:WorldToCellPreferSolid(position: Vector3): Vector3
```

- Tags: Capabilities: Environment

Returns the grid cell location that contains the point position, preferring non-empty grid cells when position is on a grid edge.

Parameters:

- `position`: The world-space [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) to convert to a cell coordinate.

Returns: A [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) representing the grid cell coordinates, biased toward a non-empty (solid) neighbor when the position lies on a cell boundary.

### WriteVoxelChannels

```luau
Terrain:WriteVoxelChannels(region: Region3, resolution: number, channels: { [string]: any })
```

- Tags: Custom Lua state, Capabilities: Environment

Sets a region of terrain using a dictionary of voxel channel data.

Parameters:

- `region`: Target region to write to. Must be aligned to the voxel grid. Will throw an error if region is too large; limit is currently 4194304 voxels³.
- `resolution`: Voxel resolution. Must be `4`.
- `channels`: Dictionary of voxel data similar to the return value of [`ReadVoxelChannels()`](https://rapi.sleaze.dev/classes/Terrain.md). Keys represent each channel ID with their respective value as an array of 3D data. The dictionary can support single or multiple channel inputs.

- `SolidMaterial` — The [`Material`](https://rapi.sleaze.dev/classes/BasePart.md) material of the voxel. Note that `Water` is not supported anymore; instead, a voxel that contains only water should be entered as `SolidMaterial = Enum.Material.Air, LiquidOccupancy = x`, where `x` is a number between `0` (exclusive) and `1` (inclusive).
- `SolidOccupancy` — The occupancy of the voxel's material as specified in the `SolidMaterial` channel. This should be a value between `0` (empty) and `1` (full).
- `LiquidOccupancy` — Specifies the occupancy of the `Water` material in a voxel as a value between `0` (no water) and `1` (full of water). If the `SolidOccupancy` is 1 and the `SolidMaterial` is not `Air`, this will be `0`.

### WriteVoxels

```luau
Terrain:WriteVoxels(region: Region3, resolution: number, materials: { any }, occupancy: { any })
```

- Tags: Custom Lua state, Capabilities: Environment

Sets a certain region of smooth terrain using table format.

Parameters:

- `region`: Target region to write to. Must be aligned to the voxel grid. Will throw an error if region is too large.
- `resolution`: Voxel resolution. Must be `4`.
- `materials`: 3D array of [`Material`](https://rapi.sleaze.dev/classes/BasePart.md). Dimensions must exactly match the size of the target region in voxels.
- `occupancy`: 3D array of voxel occupancies (number between `0` and `1`). Dimensions must exactly match the size of the target region in voxels.

### WriteVoxelsAsync_beta

```luau
Terrain:WriteVoxelsAsync_beta(region: Region3, resolution: number, channelIds: { any }): TerrainWriteOperation
```

- Tags: Custom Lua state, Capabilities: Environment

### AutowedgeCell

```luau
Terrain:AutowedgeCell(x: number, y: number, z: number): boolean
```

- Tags: Deprecated, Capabilities: Environment

**Deprecated:** This item is a deprecated function of a legacy [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) engine that has been removed. Do not use it for new work.

Obsolete function which no longer does anything.

Parameters:

- `x`: The X coordinate of the terrain cell.
- `y`: The Y coordinate of the terrain cell.
- `z`: The Z coordinate of the terrain cell.

Returns: Always returns `true`; the function no longer performs any operation.

### AutowedgeCells

```luau
Terrain:AutowedgeCells(region: Region3int16)
```

- Tags: Deprecated, Capabilities: Environment

**Deprecated:** This item is a deprecated function of a legacy [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) engine that has been removed. Do not use it for new work.

Obsolete function which no longer does anything.

Parameters:

- `region`: The [`Region3int16`](https://rapi.sleaze.dev/index/types/Region3int16.md) specifying the region of terrain cells to process.

### ConvertToSmooth

```luau
Terrain:ConvertToSmooth()
```

- Tags: Deprecated, Plugin security, Capabilities: Environment

**Deprecated:** Since all places now automatically use the new terrain engine, this method is obsolete.

Transforms the legacy terrain engine into the new terrain engine.

### GetCell

```luau
Terrain:GetCell(x: number, y: number, z: number): ...any
```

- Tags: Deprecated, Capabilities: Environment

**Deprecated:** This item is a deprecated function of a legacy [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) engine that has been removed. Do not use it for new work.

Returns the closest cell material from the legacy terrain engine that matches the smooth terrain voxel specified.

Parameters:

- `x`: The X coordinate of the terrain cell.
- `y`: The Y coordinate of the terrain cell.
- `z`: The Z coordinate of the terrain cell.

Returns: A tuple containing the legacy cell material, block type, and orientation of the specified cell.

### GetWaterCell

```luau
Terrain:GetWaterCell(x: number, y: number, z: number): ...any
```

- Tags: Deprecated, Capabilities: Environment

**Deprecated:** This item is a deprecated function of a legacy [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) engine that has been removed. Do not use it for new work.

Returns `true` if the cell is a water cell.

Parameters:

- `x`: The X coordinate of the terrain cell.
- `y`: The Y coordinate of the terrain cell.
- `z`: The Z coordinate of the terrain cell.

Returns: A tuple containing whether the cell has water, the water force, and the water direction.

### SetCell

```luau
Terrain:SetCell(x: number, y: number, z: number, material: Enum.CellMaterial, block: Enum.CellBlock, orientation: Enum.CellOrientation)
```

- Tags: Deprecated, Capabilities: Environment

**Deprecated:** This item is a deprecated function of a legacy [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) engine that has been removed. Do not use it for new work.

Sets the occupancy and material of a specific terrain voxel.

Parameters:

- `x`: The X coordinate of the terrain cell.
- `y`: The Y coordinate of the terrain cell.
- `z`: The Z coordinate of the terrain cell.
- `material`: The `CellMaterial` to set for the cell.
- `block`: The `CellBlock` shape type for the cell.
- `orientation`: The `CellOrientation` rotation for the cell.

### SetCells

```luau
Terrain:SetCells(region: Region3int16, material: Enum.CellMaterial, block: Enum.CellBlock, orientation: Enum.CellOrientation)
```

- Tags: Deprecated, Capabilities: Environment

**Deprecated:** This item is a deprecated function of a legacy [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) engine that has been removed. Do not use it for new work.

Sets the occupancy and material of all terrain voxels in a specific region.

Parameters:

- `region`: The [`Region3int16`](https://rapi.sleaze.dev/index/types/Region3int16.md) specifying the area of terrain cells to set.
- `material`: The `CellMaterial` to apply to all cells in the region.
- `block`: The `CellBlock` shape type to apply to all cells in the region.
- `orientation`: The `CellOrientation` rotation to apply to all cells in the region.

### SetWaterCell

```luau
Terrain:SetWaterCell(x: number, y: number, z: number, force: Enum.WaterForce, direction: Enum.WaterDirection)
```

- Tags: Deprecated, Capabilities: Environment

**Deprecated:** This item is a deprecated function of a legacy [`Terrain`](https://rapi.sleaze.dev/classes/Terrain.md) engine that has been removed. Do not use it for new work.

Sets the specified terrain voxel's material to water and sets its occupancy to `1`.

Parameters:

- `x`: The X coordinate of the terrain cell.
- `y`: The Y coordinate of the terrain cell.
- `z`: The Z coordinate of the terrain cell.
- `force`: The `WaterForce` value representing the water force in the cell.
- `direction`: The `WaterDirection` value representing the water flow direction.

## Events

### GridBackendReloadRequired

```luau
Terrain.GridBackendReloadRequired: RBXScriptSignal<(wouldUseNewGrid: boolean)>
```

- Tags: Roblox script security, Capabilities: Environment

## Inherited members

- From [BasePart](https://rapi.sleaze.dev/classes/BasePart.md): `BrickColor`, `CastShadow`, `Color`, `Color3uint8`, `Material`, `MaterialVariant`, `MaterialVariantSerialized`, `Reflectance`, `Transparency`, `brickColor`, `AssemblyAngularVelocity`, `AssemblyCenterOfMass`, `AssemblyLinearVelocity`, `AssemblyMass`, `AssemblyRootPart`, `DraggingV1`, `EnableFluidForces`, `NetworkOwnershipRule`, `AudioCanCollide`, `CanCollide`, `CanQuery`, `CanTouch`, `CollisionGroup`, `CollisionGroupReplicate`, `CollisionGroupId`, `LocalTransparencyModifier`, `Locked`, `NetworkIsSleeping`, `NetworkOwnerV3`, `ResizeableFaces`, `ResizeIncrement`, `Rotation`, `RotVelocity`, `SpecificGravity`, `Velocity`, `Anchored`, `CenterOfMass`, `CurrentPhysicalProperties`, `CustomPhysicalProperties`, `Mass`, `Massless`, `ReceiveAge`, `RootPriority`, `siz`, `size`, `Elasticity`, `Friction`, `PivotOffset`, `BackSurface`, `BottomSurface`, `FrontSurface`, `LeftSurface`, `RightSurface`, `TopSurface`, `BackParamA`, `BackParamB`, `BackSurfaceInput`, `BottomParamA`, `BottomParamB`, `BottomSurfaceInput`, `FrontParamA`, `FrontParamB`, `FrontSurfaceInput`, `LeftParamA`, `LeftParamB`, `LeftSurfaceInput`, `RightParamA`, `RightParamB`, `RightSurfaceInput`, `TopParamA`, `TopParamB`, `TopSurfaceInput`, `CFrame`, `ExtentsCFrame`, `ExtentsSize`, `Orientation`, `PhysicsRepRootPart`, `PhysicsRepRootRef`, `Position`, `ReplicationPV`, `Size`, `AngularAccelerationToTorque`, `ApplyAngularImpulse`, `ApplyImpulse`, `ApplyImpulseAtPosition`, `BindToCollisionSummaries`, `CanCollideWith`, `CanSetNetworkOwnership`, `GetClosestPointOnSurface`, `GetConnectedParts`, `GetJoints`, `GetMass`, `GetNetworkOwner`, `GetNetworkOwnershipAuto`, `GetNoCollisionConstraints`, `GetPhysicsCost`, `GetTouchingParts`, `GetVelocityAtPosition`, `IntersectAsync`, `IsGrounded`, `Resize`, `SetNetworkOwner`, `SetNetworkOwnershipAuto`, `SubtractAsync`, `TorqueToAngularAcceleration`, `UnionAsync`, `BreakJoints`, `GetRenderCFrame`, `GetRootPart`, `MakeJoints`, `breakJoints`, `getMass`, `makeJoints`, `resize`, `NetworkOwnerChanged`, `Touched`, `TouchEnded`, `LocalSimulationTouched`, `OutfitChanged`, `StoppedTouching`
- From [PVInstance](https://rapi.sleaze.dev/classes/PVInstance.md): `Pivot Offset`, `Origin`, `GetPivot`, `PivotTo`
- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
