Skip to content
Roblox API Reference

Terrain

Terrain lets you to create dynamically morphable environments.
  • Not creatable
Memory category
Instances
Own members
80
Inherited members
199
Subclasses
0
Siblings
6

Properties127

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Inherited fromPVInstance2

Property categoryPivot

  • Editor-only property that displays and edits the pivot's CFrame relative to the instance, moving only the pivot and leaving the instance in place.
    • Not replicated
    • Not scriptable

Property categoryTransform

  • Editor-only property that reads and sets the world CFrame of the PVInstance's pivot, moving the entire instance when changed from the Studio Properties window.
    • Not replicated
    • Not scriptable
Inherited fromBasePart81

Property categoryAppearance

Property categoryAssembly

Property categoryBehavior

Property categoryCollision

Property categoryData

Property categoryPart

Property categoryPivot

Property categorySurface

Property categorySurface Inputs

Property categoryTransform

Defined byTerrain21

Property categoryAppearance

  • Terrain.Decoration: boolean = false
    Enables or disables terrain decoration.
    • Not scriptable
    • Capabilities: Environment
  • Terrain.GrassLength: number = 0.699999988
    Specifies the length of animated grass.
    • Not scriptable
    • Capabilities: Environment
  • Terrain.MaterialColors: string = ""
    Represents the editor for the Material Color feature and cannot be edited by scripts.
    • Not scriptable
    • Capabilities: Environment
  • Terrain.Materials: SharedString
    • Hidden
    • Not scriptable
    • Capabilities: Environment
  • Terrain.SmoothVoxelsUpgraded: boolean = false
    • Hidden
    • Roblox script security
    • Read capabilities: Environment
  • Terrain.WaterColor: Color3 = Color3.new(0.05, 0.33, 0.36)
    The tint of Terrain water.
    • Capabilities: Environment
  • Terrain.WaterReflectance: number = 1
    Controls how opaque Terrain water reflections are.
    • Capabilities: Environment
  • Terrain.WaterTransparency: number = 0.300000012
    The transparency of Terrain water.
    • Capabilities: Environment
  • Terrain.WaterWaveSize: number = 0.150000006
    Sets the maximum height of Terrain water waves in studs.
    • Capabilities: Environment
  • Terrain.WaterWaveSpeed: number = 10
    Sets how many times Terrain water waves will move up and down per minute.
    • Capabilities: Environment

Property categoryBehavior

  • Terrain.ExpandedTerrainResolved: boolean = false
    • Hidden
    • Read: Roblox script security
    • Write: Roblox engine security
    • Read capabilities: Environment

Property categoryData

    • Hidden
    • Not scriptable
    • Roblox script security
    • Read capabilities: Environment
  • Terrain.ClusterGrid: string
    • Hidden
    • Not replicated
    • Not scriptable
    • Write only
    • Read capabilities: Environment
    • Load only
  • Terrain.ClusterGridV2: string
    • Hidden
    • Not replicated
    • Not scriptable
    • Write only
    • Read capabilities: Environment
    • Load only
  • Terrain.ClusterGridV3: string
    • Hidden
    • Not replicated
    • Not scriptable
    • Write only
    • Read capabilities: Environment
    • Load only
    • Hidden
    • Not replicated
    • Roblox script security
    • Read capabilities: Environment
  • Terrain.MaxExtents: Region3int16
    Displays the boundaries of the largest possible editable region.
    • Read only
    • Capabilities: Environment
  • Terrain.PhysicsGrid: string = "\u0002\u0003"
    • Hidden
    • Not replicated
    • Not scriptable
    • Read capabilities: Environment
  • Terrain.SmoothGrid: string = ""
    • Hidden
    • Not replicated
    • Not scriptable
    • Read capabilities: Environment
  • Terrain.VoxelGridAssetContentMap: AssetContentMap
    • Hidden
    • Not replicated
    • Not scriptable
    • Roblox script security
    • Read capabilities: Environment
  • Terrain.IsSmooth: boolean = true
    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.
    • Deprecated
    • Read only
    • Read capabilities: Environment

Methods135

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Inherited fromPVInstance2
Inherited fromBasePart33
Defined byTerrain58
  • Terrain:CanSmoothVoxelsBeUpgraded(): boolean
    • Roblox script security
    • Capabilities: Environment
    Returns
    Type
    boolean
  • Terrain:CellCenterToWorld(x: number, y: number, z: number): Vector3
    Returns the world position of the center of the terrain cell.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    x: number
    The X coordinate of the terrain cell in grid space.
    y: number
    The Y coordinate of the terrain cell in grid space.
    z: number
    The Z coordinate of the terrain cell in grid space.
    Returns
    TypeDescription
    Vector3
    The world-space Vector3 position at the center of the specified cell.
  • Terrain:CellCornerToWorld(x: number, y: number, z: number): Vector3
    Returns the position of the lower-left-forward corner of the grid cell.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    x: number
    The X coordinate of the terrain cell in grid space.
    y: number
    The Y coordinate of the terrain cell in grid space.
    z: number
    The Z coordinate of the terrain cell in grid space.
    Returns
    TypeDescription
    Vector3
    The world-space Vector3 position of the lower-left-forward corner of the specified cell.
  • Terrain:Clear()
    Clears all terrain.
    • Capabilities: Environment
  • Terrain:ClearVoxelsAsync_beta(region: Region3, channelIds: { any })
    • Custom Lua state
    • Capabilities: Environment
    Parameters
    Parameter
    region: Region3
    channelIds: { any }
  • Terrain:CopyRegion(region: Region3int16): TerrainRegion
    Stores a chunk of terrain into a TerrainRegion object so it can be loaded back later.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    region: Region3int16
    The Region3int16 defining the area of terrain to copy, in cell coordinates.
    Returns
    TypeDescription
    TerrainRegion
    A TerrainRegion containing the copied voxel data from the specified region.
  • Terrain:CountCells(): number
    Returns the number of non-empty cells in the terrain.
    • Capabilities: Environment
    Returns
    TypeDescription
    number
    The approximate number of non-empty terrain cells.
  • Terrain:CreateVoxelBuffer_beta(): VoxelBuffer
    • Roblox script security
    • Capabilities: Environment
    Returns
    Type
    VoxelBuffer
  • Terrain:DrawBufferAsync(cframe: CFrame,scale: number,resolution: number,source: VoxelBuffer,mergeConfig: { [string]: any },)
    • Yields
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    cframe: CFrame
    scale: number
    resolution: number
    source: VoxelBuffer
    mergeConfig: { [string]: any }
  • Terrain:FillBall(center: Vector3, radius: number, material: Enum.Material)
    Fills a ball of smooth terrain in a given space.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    center: Vector3
    The position of the center of the terrain ball.
    radius: number
    The radius in studs of the terrain ball.
    material: Enum.Material
    The Material of the terrain ball.
  • Terrain:FillBallSlot(center: Vector3,radius: number,solidMaterialIndex: number,)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    center: Vector3
    radius: number
    solidMaterialIndex: number
  • Terrain:FillBlock(cframe: CFrame, size: Vector3, material: Enum.Material)
    Fills a block of smooth terrain with a given location, rotation, size, and material.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    cframe: CFrame
    The position and orientation of the terrain block.
    size: Vector3
    The size in studs of the square block (both the height and width).
    material: Enum.Material
    The Material of the terrain block.
  • Terrain:FillBlockSlot(cframe: CFrame, size: Vector3, solidMaterialIndex: number)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    cframe: CFrame
    size: Vector3
    solidMaterialIndex: number
  • Terrain:FillCylinder(cframe: CFrame,height: number,radius: number,material: Enum.Material,)
    Fills a cylinder of smooth terrain in a given space.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    cframe: CFrame
    The position and orientation of the terrain cylinder.
    height: number
    The height in studs of the terrain cylinder.
    radius: number
    The radius in studs of the terrain cylinder.
    material: Enum.Material
    The Material of the terrain cylinder.
  • Terrain:FillCylinderSlot(cframe: CFrame,height: number,radius: number,solidMaterialIndex: number,)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    cframe: CFrame
    height: number
    radius: number
    solidMaterialIndex: number
  • Terrain:FillRegion(region: Region3, resolution: number, material: Enum.Material)
    Fills a Region3 space with smooth terrain.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    region: Region3
    The Region3 to fill, which must be aligned to the voxel grid.
    resolution: number
    The voxel resolution; must be exactly 4.
    material: Enum.Material
    The Material to fill the region with.
  • Terrain:FillRegionSlot(region: Region3,resolution: number,solidMaterialIndex: number,)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    region: Region3
    resolution: number
    solidMaterialIndex: number
  • Terrain:FillWedge(cframe: CFrame, size: Vector3, material: Enum.Material)
    Fills a wedge-shaped volume of terrain with the given Material.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    cframe: CFrame
    The position and orientation of the wedge to fill.
    size: Vector3
    The size of the wedge to fill.
    material: Enum.Material
    The material with which the wedge will be filled.
  • Terrain:FillWedgeSlot(cframe: CFrame, size: Vector3, solidMaterialIndex: number)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    cframe: CFrame
    size: Vector3
    solidMaterialIndex: number
  • Terrain:GenerateWaterFlowMap(generateFoam: boolean)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    generateFoam: boolean
  • Terrain:GetMaterialColor(material: Enum.Material): Color3
    Returns current terrain material color for specified terrain material.
    • Thread safe
    • Capabilities: Environment
    Parameters
    ParameterDescription
    material: Enum.Material
    The Material whose terrain color to retrieve.
    Returns
    TypeDescription
    Color3
    The Color3 representing the current color tint of the specified material.
  • Terrain:GetMaterialSlot(slotIndex: number): ...any
    • Capabilities: Environment
    Parameters
    Parameter
    slotIndex: number
    Returns
    Type
    ...any
  • Terrain:GetTerrainWireframe(cframe: CFrame, size: Vector3): { any }
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    cframe: CFrame
    size: Vector3
    Returns
    Type
    { any }
  • Terrain:IsMaterialSlotInvalid(slotIndex: number): boolean
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    slotIndex: number
    Returns
    Type
    boolean
  • Terrain:IterateVoxelsAsync_beta(region: Region3,resolution: number,channelIds: { any },): TerrainIterateOperation
    • Custom Lua state
    • Capabilities: Environment
    Parameters
    Parameter
    region: Region3
    resolution: number
    channelIds: { any }
  • Terrain:ModifyVoxelsAsync_beta(region: Region3,resolution: number,channelIds: { any },): TerrainModifyOperation
    • Custom Lua state
    • Capabilities: Environment
    Parameters
    Parameter
    region: Region3
    resolution: number
    channelIds: { any }
  • Terrain:PasteRegion(region: TerrainRegion,corner: Vector3int16,pasteEmptyCells: boolean,)
    Applies a chunk of terrain to the Terrain object.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    region: TerrainRegion
    The TerrainRegion to paste, previously obtained from Terrain:CopyRegion().
    corner: Vector3int16
    The Vector3int16 cell coordinate at which to place the lower-left-forward corner of the region.
    pasteEmptyCells: boolean
    Whether to overwrite existing terrain with empty (air) cells from the region.
  • Terrain:ReadBufferAsync(region: Region3, resolution: number): VoxelBuffer
    • Yields
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    region: Region3
    resolution: number
    Returns
    Type
    VoxelBuffer
  • Terrain:ReadVoxelChannels(region: Region3,resolution: number,channelIds: { any },): { [string]: any }
    Returns a region of terrain voxel data in table format based on the channel names.
    • Custom Lua state
    • Thread safe
    • Capabilities: Environment
    Parameters
    ParameterDescription
    region: Region3
    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: number
    Voxel resolution. Must be 4.
    channelIds: { any }
    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
    TypeDescription
    { [string]: any }
    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 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 key with a value representing the 3D array size of each channel data.
  • Terrain:ReadVoxels(region: Region3, resolution: number): ...any
    Returns a certain region of smooth terrain in table format.
    • Custom Lua state
    • Thread safe
    • Capabilities: Environment
    Parameters
    ParameterDescription
    region: Region3
    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: number
    Voxel resolution. Must be 4.
    Returns
    TypeDescription
    ...any
    Returns raw voxel data as two 3D arrays.
    • materials - 3D array of Material 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.
  • Terrain:ReadVoxelsAsync_beta(region: Region3,resolution: number,channelIds: { any },): TerrainReadOperation
    • Custom Lua state
    • Capabilities: Environment
    Parameters
    Parameter
    region: Region3
    resolution: number
    channelIds: { any }
  • Terrain:ReplaceMaterial(region: Region3,resolution: number,sourceMaterial: Enum.Material,targetMaterial: Enum.Material,)
    Replaces the terrain of a material within a region with another material.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    region: Region3
    The region in which the replacement operation will occur.
    resolution: number
    The resolution at which the replacement operation will take place; at the moment this must be exactly 4.
    sourceMaterial: Enum.Material
    The old material that shall be replaced.
    targetMaterial: Enum.Material
    The new material.
  • Terrain:ReplaceMaterialInTransform(cframe: CFrame,size: Vector3,sourceMaterial: Enum.Material,targetMaterial: Enum.Material,)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    cframe: CFrame
    size: Vector3
    sourceMaterial: Enum.Material
    targetMaterial: Enum.Material
  • Terrain:ReplaceMaterialInTransformSubregion(cframe: CFrame,size: Vector3,sourceMaterial: Enum.Material,targetMaterial: Enum.Material,targetRegion: Region3int16,)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    cframe: CFrame
    size: Vector3
    sourceMaterial: Enum.Material
    targetMaterial: Enum.Material
    targetRegion: Region3int16
  • Terrain:ReplaceMaterialInTransformSubregionSlot(cframe: CFrame,size: Vector3,sourceMaterialIndex: number,targetMaterialIndex: number,targetRegion: Region3int16,)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    cframe: CFrame
    size: Vector3
    sourceMaterialIndex: number
    targetMaterialIndex: number
    targetRegion: Region3int16
  • Terrain:ResetMaterialSlot(slotIndex: number)
    • Capabilities: Environment
    Parameters
    Parameter
    slotIndex: number
  • Terrain:ResetWaterFlowMap()
    • Roblox script security
    • Capabilities: Environment
  • Terrain:SetMaterialColor(material: Enum.Material, value: Color3)
    Sets current terrain material color for specified terrain material.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    material: Enum.Material
    The Material whose terrain color to change.
    value: Color3
    The Color3 to apply as the new color tint for the material.
  • Terrain:SetMaterialInTransform(cframe: CFrame,size: Vector3,targetMaterial: Enum.Material,)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    cframe: CFrame
    size: Vector3
    targetMaterial: Enum.Material
  • Terrain:SetMaterialInTransformSubregion(cframe: CFrame,size: Vector3,targetMaterial: Enum.Material,targetRegion: Region3int16,)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    cframe: CFrame
    size: Vector3
    targetMaterial: Enum.Material
    targetRegion: Region3int16
  • Terrain:SetMaterialInTransformSubregionSlot(cframe: CFrame,size: Vector3,targetMaterialIndex: number,targetRegion: Region3int16,)
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    cframe: CFrame
    size: Vector3
    targetMaterialIndex: number
    targetRegion: Region3int16
  • Terrain:SetMaterialSlot(slotIndex: number,baseMaterial: Enum.Material,materialVariant: string,color: Color3,)
    • Capabilities: Environment
    Parameters
    Parameter
    slotIndex: number
    baseMaterial: Enum.Material
    materialVariant: string
    color: Color3
  • Terrain:SmoothRegion(region: Region3,resolution: number,strength: number,): ...any
    • Custom Lua state
    • Roblox script security
    • Thread safe
    • Capabilities: Environment
    Parameters
    Parameter
    region: Region3
    resolution: number
    strength: number
    Returns
    Type
    ...any
  • Terrain:SmoothRegionMaterialSlots(region: Region3,resolution: number,strength: number,): ...any
    • Custom Lua state
    • Roblox script security
    • Thread safe
    • Capabilities: Environment
    Parameters
    Parameter
    region: Region3
    resolution: number
    strength: number
    Returns
    Type
    ...any
  • Terrain:WorldToCell(position: Vector3): Vector3
    Returns the grid cell location that contains the position point.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    position: Vector3
    The world-space Vector3 to convert to a cell coordinate.
    Returns
    TypeDescription
    Vector3
    A Vector3 representing the grid cell coordinates containing the given position.
  • Terrain:WorldToCellPreferEmpty(position: Vector3): Vector3
    Returns the grid cell location that contains the position point, preferring empty grid cells when position is on a grid edge.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    position: Vector3
    The world-space Vector3 to convert to a cell coordinate.
    Returns
    TypeDescription
    Vector3
    A Vector3 representing the grid cell coordinates, biased toward an empty (air) neighbor when the position lies on a cell boundary.
  • Terrain:WorldToCellPreferSolid(position: Vector3): Vector3
    Returns the grid cell location that contains the point position, preferring non-empty grid cells when position is on a grid edge.
    • Capabilities: Environment
    Parameters
    ParameterDescription
    position: Vector3
    The world-space Vector3 to convert to a cell coordinate.
    Returns
    TypeDescription
    Vector3
    A Vector3 representing the grid cell coordinates, biased toward a non-empty (solid) neighbor when the position lies on a cell boundary.
  • Terrain:WriteVoxelChannels(region: Region3,resolution: number,channels: { [string]: any },)
    Sets a region of terrain using a dictionary of voxel channel data.
    • Custom Lua state
    • Capabilities: Environment
    Parameters
    ParameterDescription
    region: Region3
    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: number
    Voxel resolution. Must be 4.
    channels: { [string]: any }
    Dictionary of voxel data similar to the return value of ReadVoxelChannels(). 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 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.
  • Terrain:WriteVoxels(region: Region3,resolution: number,materials: { any },occupancy: { any },)
    Sets a certain region of smooth terrain using table format.
    • Custom Lua state
    • Capabilities: Environment
    Parameters
    ParameterDescription
    region: Region3
    Target region to write to. Must be aligned to the voxel grid. Will throw an error if region is too large.
    resolution: number
    Voxel resolution. Must be 4.
    materials: { any }
    3D array of Material. Dimensions must exactly match the size of the target region in voxels.
    occupancy: { any }
    3D array of voxel occupancies (number between 0 and 1). Dimensions must exactly match the size of the target region in voxels.
  • Terrain:WriteVoxelsAsync_beta(region: Region3,resolution: number,channelIds: { any },): TerrainWriteOperation
    • Custom Lua state
    • Capabilities: Environment
    Parameters
    Parameter
    region: Region3
    resolution: number
    channelIds: { any }
  • Terrain:AutowedgeCell(x: number, y: number, z: number): boolean
    Deprecated: This item is a deprecated function of a legacy Terrain engine that has been removed. Do not use it for new work.
    Obsolete function which no longer does anything.
    • Deprecated
    • Capabilities: Environment
    Parameters
    ParameterDescription
    x: number
    The X coordinate of the terrain cell.
    y: number
    The Y coordinate of the terrain cell.
    z: number
    The Z coordinate of the terrain cell.
    Returns
    TypeDescription
    boolean
    Always returns true; the function no longer performs any operation.
  • Terrain:AutowedgeCells(region: Region3int16)
    Deprecated: This item is a deprecated function of a legacy Terrain engine that has been removed. Do not use it for new work.
    Obsolete function which no longer does anything.
    • Deprecated
    • Capabilities: Environment
    Parameters
    ParameterDescription
    region: Region3int16
    The Region3int16 specifying the region of terrain cells to process.
  • Terrain:ConvertToSmooth()
    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.
    • Deprecated
    • Plugin security
    • Capabilities: Environment
  • Terrain:GetCell(x: number, y: number, z: number): ...any
    Deprecated: This item is a deprecated function of a legacy Terrain 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.
    • Deprecated
    • Capabilities: Environment
    Parameters
    ParameterDescription
    x: number
    The X coordinate of the terrain cell.
    y: number
    The Y coordinate of the terrain cell.
    z: number
    The Z coordinate of the terrain cell.
    Returns
    TypeDescription
    ...any
    A tuple containing the legacy cell material, block type, and orientation of the specified cell.
  • Terrain:GetWaterCell(x: number, y: number, z: number): ...any
    Deprecated: This item is a deprecated function of a legacy Terrain engine that has been removed. Do not use it for new work.
    Returns true if the cell is a water cell.
    • Deprecated
    • Capabilities: Environment
    Parameters
    ParameterDescription
    x: number
    The X coordinate of the terrain cell.
    y: number
    The Y coordinate of the terrain cell.
    z: number
    The Z coordinate of the terrain cell.
    Returns
    TypeDescription
    ...any
    A tuple containing whether the cell has water, the water force, and the water direction.
  • Terrain:SetCell(x: number,y: number,z: number,material: Enum.CellMaterial,block: Enum.CellBlock,orientation: Enum.CellOrientation,)
    Deprecated: This item is a deprecated function of a legacy Terrain engine that has been removed. Do not use it for new work.
    Sets the occupancy and material of a specific terrain voxel.
    • Deprecated
    • Capabilities: Environment
    Parameters
    ParameterDescription
    x: number
    The X coordinate of the terrain cell.
    y: number
    The Y coordinate of the terrain cell.
    z: number
    The Z coordinate of the terrain cell.
    material: Enum.CellMaterial
    The CellMaterial to set for the cell.
    block: Enum.CellBlock
    The CellBlock shape type for the cell.
    orientation: Enum.CellOrientation
    The CellOrientation rotation for the cell.
  • Terrain:SetCells(region: Region3int16,material: Enum.CellMaterial,block: Enum.CellBlock,orientation: Enum.CellOrientation,)
    Deprecated: This item is a deprecated function of a legacy Terrain 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.
    • Deprecated
    • Capabilities: Environment
    Parameters
    ParameterDescription
    region: Region3int16
    The Region3int16 specifying the area of terrain cells to set.
    material: Enum.CellMaterial
    The CellMaterial to apply to all cells in the region.
    block: Enum.CellBlock
    The CellBlock shape type to apply to all cells in the region.
    orientation: Enum.CellOrientation
    The CellOrientation rotation to apply to all cells in the region.
  • Terrain:SetWaterCell(x: number,y: number,z: number,force: Enum.WaterForce,direction: Enum.WaterDirection,)
    Deprecated: This item is a deprecated function of a legacy Terrain 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.
    • Deprecated
    • Capabilities: Environment
    Parameters
    ParameterDescription
    x: number
    The X coordinate of the terrain cell.
    y: number
    The Y coordinate of the terrain cell.
    z: number
    The Z coordinate of the terrain cell.
    force: Enum.WaterForce
    The WaterForce value representing the water force in the cell.
    direction: Enum.WaterDirection
    The WaterDirection value representing the water flow direction.

Events17

Inherited fromObject1
Inherited fromInstance9
Inherited fromBasePart6
Defined byTerrain1
  • Terrain.GridBackendReloadRequired: RBXScriptSignal<(wouldUseNewGrid: boolean)>
    • Roblox script security
    • Capabilities: Environment
    Parameters
    Parameter
    wouldUseNewGrid: boolean