Terrain lets you to create dynamically morphable environments.- Memory category
- Instances
- Own members
- 80
- Inherited members
- 199
- Subclasses
- 0
- Siblings
- 6
Properties127
Property categoryBehavior
- Determines if an
Instanceand its descendants can be cloned usingInstance:Clone(), and can be saved/published. - Deprecated: This deprecated property is a variant of
Instance.Archivablewhich should be used instead.Use Archivable instead.
Property categoryData
Property categoryPermissions
- The set of capabilities allowed to be used for scripts inside this container.
- Indicates whether the instance is inside a sandboxed container.
- When enabled, the instance can only access abilities in its
Capabilitieslist.
Property categoryPivot
- Editor-only property that displays and edits the pivot's
CFramerelative to the instance, moving only the pivot and leaving the instance in place.
Property categoryTransform
- Editor-only property that reads and sets the world
CFrameof thePVInstance's pivot, moving the entire instance when changed from the Studio Properties window.
Property categoryAppearance
- Determines the color of a part.
- Determines whether or not a part casts a shadow.
- Determines the color of a part.
- Determines the texture and default physical properties of a part.
- The name of
MaterialVariant. - Determines how much a part reflects the skybox.
- Determines how much a part can be seen through (the inverse of part opacity).
- Deprecated: This deprecated property is an old Camel Case variant of the Pascal Case
BasePart.BrickColor, which should be used instead.Use BrickColor instead.
Property categoryAssembly
- The angular velocity of the part's assembly.
- The center of mass of the part's assembly in world space.
- The linear velocity of the part's assembly.
- The total mass of the part's assembly.
- A reference to the root part of the assembly.
Property categoryBehavior
- Used to enable or disable aerodynamic forces on parts and assemblies.
Property categoryCollision
- Determines whether the part will physically interact with audio simulation, similar to
CastShadowfor lighting. - Determines whether a part may collide with other parts.
- Determines whether the part is considered during spatial query operations.
- Determines if
TouchedandTouchEndedevents fire on the part. - Describes the name of a part's collision group.
- Deprecated:
Describes the automatically set ID number of a part's collision group.Use CollisionGroup instead.
Property categoryData
- Determines a multiplier for
BasePart.Transparencythat is only visible to the local client. - Determines whether a part is selectable in Studio.
- Describes the faces on which a part may be resized.
- Describes the smallest change in size allowable by the
Resize()method. - The rotation of the part in degrees for the three axes.
- Deprecated: This property is deprecated. Use
AssemblyAngularVelocityinstead.
Determines a part's change in orientation over time.Use AssemblyAngularVelocity instead.
- Deprecated: This item is deprecated. See
BasePart.CustomPhysicalPropertiesto see how to configure the physical properties of BaseParts. Do not use it for new work.
The ratio of the part's density to the density of water determined by theBasePart.Material.Use SpecificGravity instead.
- Deprecated: This property is deprecated. Use
AssemblyLinearVelocityinstead.
Determines a part's change in position over time.Use AssemblyLinearVelocity instead.
Property categoryPart
- Determines whether a part is immovable by physics.
- Describes the world position in which a part's center of mass is located.
- Indicates the current physical properties of the part.
- Determines several physical properties of a part.
- Describes the mass of the part, the product of its density and volume.
- Determines whether the part contributes to the total mass or inertia of its rigid body.
- Time since last recorded physics update.
- The main rule in determining the root part of an assembly.
- Deprecated: This is only one of multiple physics-related properties. It has been deprecated in favor of
BasePart.CustomPhysicalProperties, which combines these properties into one.
Used to control the Elasticity of the part, but it no longer does anything. - Deprecated: This is only one of multiple physics-related properties. It has been deprecated in favor of
BasePart.CustomPhysicalProperties, which combines these properties into one.
Used to control the Friction of the part, but now it no longer does anything.
Property categorySurface
- Determines the type of surface for the back face of a part.
- Determines the type of surface for the bottom face of a part.
- Determines the type of surface for the front face of a part.
- Determines the type of surface for the left face of a part.
- Determines the type of surface for the right face of a part.
- Determines the type of surface for the top face of a part.
Property categorySurface Inputs
- Deprecated:
Determines the first parameter for the SurfaceType on the Back face of a part. - Deprecated:
Determines the second parameter for the SurfaceType on the Back face of a part. - Deprecated:
Determines the kind of input for the Back face of a part. - Deprecated:
Determines the first parameter for the SurfaceType on the Bottom face of a part. - Deprecated:
Determines the second parameter for the SurfaceType on the Bottom face of a part. - Deprecated:
Determines the kind of input for the Bottom face of a part. - Deprecated:
Determines the first parameter for the SurfaceType on the Front face of a part. - Deprecated:
Determines the second parameter for the SurfaceType on the Front face of a part. - Deprecated:
Determines the kind of input for the Front face of a part (-Z direction). - Deprecated:
Determines the first parameter for the SurfaceType on the Left face of a part. - Deprecated:
Determines the second parameter for the SurfaceType on the Left face of a part. - Deprecated:
Determines the kind of input for the Left face of a part. - Deprecated:
Determines the first parameter for the SurfaceType on the Right face of a part. - Deprecated:
Determines the second parameter for the SurfaceType on the Right face of a part. - Deprecated:
Determines the kind of input for the Right face of a part (-X direction). - Deprecated:
Determines the first parameter for the SurfaceType on the Top face of a part. - Deprecated:
Determines the second parameter for the SurfaceType on the Top face of a part. - Deprecated:
Determines the kind of input for the Top face of a part (+Y direction).
Property categoryTransform
- Determines the position and orientation of the
BasePartin the world. - The actual physical size of the
BasePartas regarded by the physics engine. - Describes the rotation of the part in the world.
- Describes the position of the part in the world.
- Determines the dimensions of a part (length, height, width).
Defined byTerrain21
Property categoryAppearance
Terrain.Decoration: boolean = false Enables or disables terrain decoration.Terrain.GrassLength: number = 0.699999988 Specifies the length of animated grass.Terrain.MaterialColors: string = "" Represents the editor for the Material Color feature and cannot be edited by scripts.Terrain.Materials: SharedString Terrain.SmoothVoxelsUpgraded: boolean = false - The tint of
Terrainwater. Terrain.WaterReflectance: number = 1 Controls how opaqueTerrainwater reflections are.Terrain.WaterTransparency: number = 0.300000012 The transparency ofTerrainwater.Terrain.WaterWaveSize: number = 0.150000006 Sets the maximum height ofTerrainwater waves in studs.Terrain.WaterWaveSpeed: number = 10 Sets how many timesTerrainwater waves will move up and down per minute.
Property categoryData
Terrain.AcquisitionMethod: Enum.TerrainAcquisitionMethod = Enum.TerrainAcquisitionMethod.None Terrain.ClusterGrid: string Terrain.ClusterGridV2: string Terrain.ClusterGridV3: string Terrain.LastUsedModificationMethod: Enum.TerrainAcquisitionMethod = Enum.TerrainAcquisitionMethod.None Terrain.MaxExtents: Region3int16 Displays the boundaries of the largest possible editable region.Terrain.PhysicsGrid: string = "\u0002\u0003" Terrain.SmoothGrid: string = "" Terrain.VoxelGridAssetContentMap: AssetContentMap Terrain.IsSmooth: boolean = true Deprecated: The legacy terrain engine has been removed, so this property will always betrue.
Returnstrueif the game is using the smooth terrain system.
No properties match the filters.
Methods135
Object:GetPropertyChangedSignal( property: string): RBXScriptSignal Get an event that fires when a given property of the object changes.Parameters Parameter Description property: stringThe property to connect to.Returns Type Description RBXScriptSignalA signal that fires whenever the property changes.- Returns true if an object's class matches or inherits from a given class.
Parameters Parameter Description className: stringThe class against which the Object's class will be checked. Case-sensitive.Returns Type Description booleanDescribes whether the Object's class matched or is a subclass of the given class. - Deprecated: This deprecated function is a variant of
Object:IsA()which should be used instead.Parameters Parameter className: stringReturns Type booleanUse IsA instead.
- Applies a tag to the instance.
Parameters Parameter Description tag: stringThe tag to apply to the instance. - This method destroys all of an instance's children.
- Create a copy of an instance and all its descendants, ignoring instances that are not
Archivable.Returns Type Description InstanceA copy of the instance, ornilif the instance is notArchivable. - Sets the
Instance.Parentproperty tonil, locks theInstance.Parentproperty, disconnects all connections, and callsDestroy()on all children. Instance:FindFirstAncestor( name: string): Instance Returns the first ancestor of theInstancewhoseInstance.Nameis equal to the given name.Parameters Parameter Description name: stringTheInstance.Nameto be looked for.Instance:FindFirstAncestorOfClass( className: string): Instance Returns the first ancestor of theInstancewhoseObject.ClassNameis equal to the given className.Parameters Parameter Description className: stringTheObject.ClassNameto be looked for.Instance:FindFirstAncestorWhichIsA( className: string): Instance Returns the first ancestor of theInstancefor whomObject:IsA()returns true for the given className.Parameters Parameter Description className: stringTheObject.ClassNameto be looked for.Instance:FindFirstChild( name: string, recursive: boolean? = false): Instance Returns the first child of theInstancefound with the given name.Parameters Parameter Description name: stringTheInstance.Nameto be searched for.recursive: boolean? = falseWhether or not the search should be conducted recursively.Instance:FindFirstChildOfClass( className: string): Instance Parameters Parameter Description className: stringTheObject.ClassNameto be looked for.Instance:FindFirstChildWhichIsA(className: string,recursive: boolean? = false,): Instance Returns the first child of theInstancefor whomObject:IsA()returns true for the given className.Parameters Parameter Description className: stringTheObject.ClassNameto be searched for.recursive: boolean? = falseWhether or not the search should be conducted recursively.Instance:FindFirstDescendant( name: string): Instance Returns the first descendant found with the givenInstance.Name.Parameters Parameter Description name: stringTheInstance.Nameto search for.- Returns the
Actorassociated with the Instance, if any. Instance:GetAttribute( attribute: string): any Returns the value which has been assigned to the given attribute name.Parameters Parameter Description attribute: stringThe name of the attribute being retrieved.Returns Type Description anyThe value which has been assigned to the given attribute name. If no attribute has been assigned,nilis returned.Instance:GetAttributeChangedSignal( attribute: string): RBXScriptSignal Returns an event that fires when the given attribute changes.Parameters Parameter Description attribute: stringThe name of the specified attribute for which the change signal is being returned.Returns Type Description RBXScriptSignalAn event that fires when the given attribute changes.- Returns a dictionary of the instance's attributes.
Returns Type Description { [string]: any }A dictionary of string → variant pairs for each attribute where the string is the name of the attribute and the variant is a non-nil value. - Returns an array containing all of the instance's children.
Returns Type Description { Instance }An array containing the instance's children. Instance:GetDebugId( scopeLength: number? = 4): string Returns a coded string of the debug ID used internally by Roblox.Parameters Parameter Description scopeLength: number? = 4The scope length.Returns Type Description stringThe Debug ID string.- Returns an array containing all of the descendants of the instance.
Returns Type Description { Instance }An array containing the instance's descendants. - Returns a string describing the instance's ancestry.
- Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified.
Parameters Parameter Description name: stringName of the property to query.selector: string?Optional selector for the pseudo instance you are targeting on the instance.Returns Type Description anyThe styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. Instance:GetStyledPropertyChangedSignal( property: string): RBXScriptSignal Returns an event that fires when the given style property changes on the instance.Parameters Parameter Description property: stringName of the style property for which to listen for changes.Returns Type Description RBXScriptSignalEvent that fires when the given style property changes.- Gets an array of all tags applied to the instance.
Returns Type Description { any }An array of strings, each representing a tag applied to the instance. - Check whether the instance has a given tag.
Parameters Parameter Description tag: stringThe tag to check for on the instance.Returns Type Description booleantrueif the instance has the given tag,falseotherwise. Instance:IsAncestorOf( descendant: Instance): boolean Returns true if anInstanceis an ancestor of the given descendant.Instance:IsDescendantOf( ancestor: Instance): boolean Returnstrueif anInstanceis a descendant of the given ancestor.Instance:IsPropertyModified( property: string): boolean Returnstrueif the value stored in the specified property is not equal to the code-instantiated default.Parameters Parameter Description property: stringName of the property to query.Returns Type Description booleanBoolean indicating whether the property is modified from its code‑instantiated default.Instance:QueryDescendants( selector: string): { Instance } Returns an array containing all descendants of the instance that match theselectorstring.Parameters Parameter Description selector: stringSelector string used to filter elements.Returns Type Description { Instance }An array of instances (empty if nothing matched the selector).- Removes a tag from the instance.
Parameters Parameter Description tag: stringThe tag to remove from the instance. Instance:ResetPropertyToDefault( property: string) Resets a property to its default value.Parameters Parameter Description property: stringName of the property to reset.Instance:SetAttribute( attribute: string, value: any) Sets the attribute with the given name to the given value.Instance:WaitForChild( childName: string, timeOut: number): Instance Returns the child of theInstancewith the given name. If the child does not exist, it will yield the current thread until it does.Parameters Parameter Description childName: stringTheInstance.Nameto be looked for.timeOut: numberAn optional time out parameter.- Deprecated: This item is deprecated in favor of
Instance:Destroy()andInstance:ClearAllChildren(). If you must remove an object from the game, and wish to use the object later, set itsParentproperty tonilinstead of using this method.
Sets the object'sParenttonil, and does the same for all its descendants. - Deprecated: This item has been superseded by
Instance:GetChildren()which should be used in all new work.
Returns an array of the object's children.Returns Type Description { Instance }Array of child objects/instances.Use GetChildren instead.
- Deprecated: This deprecated function is a variant of
Instance:Clone()which should be used instead.Returns Type InstanceUse Clone instead.
- Deprecated: This deprecated function is a variant of
Instance:Destroy()which should be used instead.Use Destroy instead.
Instance:findFirstChild( name: string, recursive: boolean? = false): Instance Deprecated: This deprecated function is a variant ofInstance:FindFirstChild()which should be used instead.Returns Type InstanceUse FindFirstChild instead.
- Deprecated: This deprecated function is a variant of
Instance:GetChildren()which should be used instead.Returns Type { Instance }Use GetChildren instead.
Instance:isDescendantOf( ancestor: Instance): boolean Deprecated: This deprecated function is a variant ofInstance:IsDescendantOf()which should be used instead.Parameters Parameter ancestor: InstanceReturns Type booleanUse IsDescendantOf instead.
- Deprecated: This deprecated function is a variant of
Instance:Remove()which has also been deprecated. Neither function should be used in new work.Use Remove instead.
- Gets the pivot of a
PVInstance. PVInstance:PivotTo( targetCFrame: CFrame) Transforms thePVInstancealong with all of its descendantPVInstancessuch that the pivot is now located at the specifiedCFrame.Parameters Parameter Description targetCFrame: CFrameTheCFramethat thePVInstancepivot should equal after moving it.
BasePart:AngularAccelerationToTorque(angAcceleration: Vector3,angVelocity: Vector3? = Vector3.zero,): Vector3 Returns the torque needed to achieve a given angular acceleration on this part's assembly, optionally accounting for gyroscopic effects.Parameters Parameter Description angAcceleration: Vector3The desired angular acceleration vector in world space.angVelocity: Vector3? = Vector3.zeroThe current angular velocity of the assembly in world space. Defaults to(0, 0, 0). Supply the assembly's angular velocity to account for gyroscopic effects.BasePart:ApplyAngularImpulse( impulse: Vector3) Apply an angular impulse to the assembly.Parameters Parameter Description impulse: Vector3An angular impulse vector to be applied to the assembly.BasePart:ApplyImpulse( impulse: Vector3) Apply an impulse to the assembly at the assembly'scenter of mass.Parameters Parameter Description impulse: Vector3A linear impulse vector to be applied to the assembly.BasePart:ApplyImpulseAtPosition( impulse: Vector3, position: Vector3) Apply an impulse to the assembly at specified position.Parameters Parameter callback: (...any) -> ...anyReturns Type RBXScriptConnectionBasePart:CanCollideWith( part: BasePart): boolean Returns whether the parts can collide with each other.Parameters Parameter Description part: BasePartThe specified part being checked for collidability.Returns Type Description booleanWhether the parts can collide with each other.- Checks whether you can set a part's network ownership.
Returns Type Description ...anyWhether you can modify or read the network ownership and the reason. BasePart:GetClosestPointOnSurface( position: Vector3): Vector3 Returns the closest point on the part's surface to the given point.Parameters Parameter Description position: Vector3The world-space point to find the closest surface point to.Returns Type Description Vector3The closest point on the part's surface in world space.BasePart:GetConnectedParts( recursive: boolean? = false): { Instance } Returns a table of parts connected to the object by any kind of rigid joint.Parameters Parameter Description recursive: boolean? = falseA table of parts connected to the object by any kind ofjoint.Returns Type Description { Instance }An array ofBasePartsconnected to this part by rigid joints. Ifrecursiveis true, includes all parts in the assembly.- Return all Joints or Constraints that is connected to this Part.
Returns Type Description { Instance }An array of all Joints or Constraints connected to the Part. - Returns the value of the
Massproperty.Returns Type Description numberThe part's mass. - Returns the current player who is the network owner of this part, or
nilin case of the server.Returns Type Description InstanceThe current player who is the network owner of this part, ornilin case of the server. - Returns true if the game engine automatically decides the network owner for this part.
Returns Type Description booleanWhether the game engine automatically decides the network owner for this part. - Returns the enabled
NoCollisionConstraintobjects currently registered for this part in its physics world.Returns Type Description { Instance }An array of the enabledNoCollisionConstraintobjects currently registered for this part in its physics world. Returns Type number- Returns a table of all
BasePart.CanCollidetrue parts that intersect with this part.Returns Type Description { Instance }A table of all parts that intersect and can collide with this part. BasePart:GetVelocityAtPosition( position: Vector3): Vector3 Returns the linear velocity of the part's assembly at the given position relative to this part.Parameters Parameter Description position: Vector3The world-space position at which to compute the assembly's linear velocity.BasePart:IntersectAsync(parts: { Instance },collisionfidelity: Enum.CollisionFidelity? = Enum.CollisionFidelity.Default,renderFidelity: Enum.RenderFidelity? = Enum.RenderFidelity.Automatic,): Instance Creates a newIntersectOperationfrom the overlapping geometry of the part and the other parts in the given array.Parameters Parameter Description parts: { Instance }The objects taking part in the intersection.collisionfidelity: Enum.CollisionFidelity? = Enum.CollisionFidelity.DefaultTheCollisionFidelityvalue for the resultingIntersectOperation.renderFidelity: Enum.RenderFidelity? = Enum.RenderFidelity.AutomaticTheRenderFidelityvalue of the resultingPartOperation.Returns Type Description InstanceResultingIntersectOperationwith default name Intersect.- Returns true if the object is connected to a part that will hold it in place (eg an
Anchoredpart), otherwise returns false.Returns Type Description booleanWhether the object is connected to a part that will hold it in place. BasePart:Resize( normalId: Enum.NormalId, deltaAmount: number): boolean Changes the size of an object just like using the Studio resize tool.Parameters Parameter Description normalId: Enum.NormalIdThe side to resize.deltaAmount: numberHow much to grow/shrink on the specified side.Returns Type Description booleanWhether the part is resized.BasePart:SetNetworkOwner( playerInstance: Player? = nil) Sets the given player as network owner for this and all connected parts.Parameters Parameter Description playerInstance: Player? = nilThe player being given network ownership of the part.- Lets the game engine dynamically decide who will handle the part's physics (one of the clients or the server).
BasePart:SubtractAsync(parts: { Instance },collisionfidelity: Enum.CollisionFidelity? = Enum.CollisionFidelity.Default,renderFidelity: Enum.RenderFidelity? = Enum.RenderFidelity.Automatic,): Instance Creates a newUnionOperationfrom the part, minus the geometry occupied by the parts in the given array.Parameters Parameter Description parts: { Instance }The objects taking part in the subtraction.collisionfidelity: Enum.CollisionFidelity? = Enum.CollisionFidelity.DefaultTheCollisionFidelityvalue for the resultingUnionOperation.renderFidelity: Enum.RenderFidelity? = Enum.RenderFidelity.AutomaticTheRenderFidelityvalue of the resultingPartOperation.Returns Type Description InstanceResultingUnionOperationwith default name Union.BasePart:TorqueToAngularAcceleration(torque: Vector3,angVelocity: Vector3? = Vector3.zero,): Vector3 Returns the angular acceleration that would result from applying a given torque to this part's assembly, optionally accounting for gyroscopic effects.BasePart:UnionAsync(parts: { Instance },collisionfidelity: Enum.CollisionFidelity? = Enum.CollisionFidelity.Default,renderFidelity: Enum.RenderFidelity? = Enum.RenderFidelity.Automatic,): Instance Creates a newUnionOperationfrom the part, plus the geometry occupied by the parts in the given array.Parameters Parameter Description parts: { Instance }The objects taking part in the union with the calling part.collisionfidelity: Enum.CollisionFidelity? = Enum.CollisionFidelity.DefaultTheCollisionFidelityvalue for the resultingUnionOperation.renderFidelity: Enum.RenderFidelity? = Enum.RenderFidelity.AutomaticTheRenderFidelityvalue of the resultingPartOperation.Returns Type Description InstanceResultingUnionOperationwith default name Union.- Deprecated: This method is deprecated. To break specific joints, iterate over the part's connections using
BasePart:GetJoints()and callInstance:Destroy()on the joints you want to remove.
Breaks any surface connection with any adjacent part, includingWeldand otherJointInstance. - Deprecated: This item is been deprecated since interpolation is now applied to the
CFramedirectly. Do not use it for new work.
OBSOLETE. Returns a CFrame describing where the part is being rendered at. - Deprecated:
Returns the base part of an assembly of parts.Returns Type Description InstanceThe base part of an assembly (a collection of parts connected together).Use AssemblyRootPart instead.
- Deprecated: SurfaceType based joining is deprecated, do not use MakeJoints for new projects.
WeldConstraintsandHingeConstraintsshould be used instead.
Creates a joint on any side of the object that has a surface ID that can make a joint. - Deprecated: This deprecated function is a variant of
BasePart:BreakJoints()which should be used instead.Use BreakJoints instead.
- Deprecated: This Camel Case property has been deprecated in favor of its Pascal Case variant,
BasePart:GetMass().Returns Type numberUse GetMass instead.
- Deprecated: This deprecated function is a variant of
BasePart:MakeJoints()which should be used instead. BasePart:resize( normalId: Enum.NormalId, deltaAmount: number): boolean Deprecated: This deprecated function is a variant ofBasePart:Resize()which should be used instead.Parameters Parameter normalId: Enum.NormalIddeltaAmount: numberReturns Type booleanUse Resize instead.
Defined byTerrain58
Terrain:CanSmoothVoxelsBeUpgraded( ): boolean Returns Type boolean- Returns the world position of the center of the terrain cell.
- Returns the position of the lower-left-forward corner of the grid cell.
- Clears all terrain.
Terrain:CopyRegion( region: Region3int16): TerrainRegion Stores a chunk of terrain into aTerrainRegionobject so it can be loaded back later.Parameters Parameter Description region: Region3int16TheRegion3int16defining the area of terrain to copy, in cell coordinates.Returns Type Description TerrainRegionATerrainRegioncontaining the copied voxel data from the specified region.Terrain:CountCells( ): number Returns the number of non-empty cells in the terrain.Returns Type Description numberThe approximate number of non-empty terrain cells.Terrain:CreateVoxelBuffer_beta( ): VoxelBuffer Returns Type VoxelBufferTerrain:DrawBufferAsync(cframe: CFrame,scale: number,resolution: number,source: VoxelBuffer,mergeConfig: { [string]: any },) Parameters Parameter cframe: CFramescale: numberresolution: numbersource: VoxelBuffermergeConfig: { [string]: any }Terrain:FillBall( center: Vector3, radius: number, material: Enum.Material) Fills a ball of smooth terrain in a given space.Parameters Parameter Description center: Vector3The position of the center of the terrain ball.radius: numberThe radius in studs of the terrain ball.material: Enum.MaterialTheMaterialof the terrain ball.Terrain:FillBlock( cframe: CFrame, size: Vector3, material: Enum.Material) Fills a block of smooth terrain with a given location, rotation, size, and material.Parameters Parameter Description cframe: CFrameThe position and orientation of the terrain block.size: Vector3The size in studs of the square block (both the height and width).material: Enum.MaterialTheMaterialof the terrain block.Terrain:FillCylinder(cframe: CFrame,height: number,radius: number,material: Enum.Material,) Fills a cylinder of smooth terrain in a given space.Parameters Parameter Description cframe: CFrameThe position and orientation of the terrain cylinder.height: numberThe height in studs of the terrain cylinder.radius: numberThe radius in studs of the terrain cylinder.material: Enum.MaterialTheMaterialof the terrain cylinder.Terrain:FillRegion( region: Region3, resolution: number, material: Enum.Material) Fills aRegion3space with smooth terrain.Parameters Parameter Description region: Region3TheRegion3to fill, which must be aligned to the voxel grid.resolution: numberThe voxel resolution; must be exactly4.material: Enum.MaterialTheMaterialto fill the region with.Terrain:FillWedge( cframe: CFrame, size: Vector3, material: Enum.Material) Fills a wedge-shaped volume of terrain with the givenMaterial.Parameters Parameter Description cframe: CFrameThe position and orientation of the wedge to fill.size: Vector3The size of the wedge to fill.material: Enum.MaterialThe material with which the wedge will be filled.Terrain:GenerateWaterFlowMap( generateFoam: boolean) Parameters Parameter generateFoam: booleanTerrain:GetMaterialColor( material: Enum.Material): Color3 Returns current terrain material color for specified terrain material.Parameters Parameter Description material: Enum.MaterialTheMaterialwhose terrain color to retrieve.Parameters Parameter slotIndex: numberReturns Type ...anyReturns Type { any }Parameters Parameter slotIndex: numberReturns Type booleanTerrain:IterateVoxelsAsync_beta(region: Region3,resolution: number,channelIds: { any },): TerrainIterateOperation Returns Type TerrainIterateOperationTerrain:ModifyVoxelsAsync_beta(region: Region3,resolution: number,channelIds: { any },): TerrainModifyOperation Returns Type TerrainModifyOperationTerrain:PasteRegion(region: TerrainRegion,corner: Vector3int16,pasteEmptyCells: boolean,) Applies a chunk of terrain to theTerrainobject.Parameters Parameter Description region: TerrainRegionTheTerrainRegionto paste, previously obtained fromTerrain:CopyRegion().corner: Vector3int16TheVector3int16cell coordinate at which to place the lower-left-forward corner of the region.pasteEmptyCells: booleanWhether to overwrite existing terrain with empty (air) cells from the region.Terrain:ReadBufferAsync( region: Region3, resolution: number): VoxelBuffer Returns Type VoxelBufferTerrain:ReadVoxelChannels(region: Region3,resolution: number,channelIds: { any },): { [string]: any } Returns a region of terrain voxel data in table format based on the channel names.Parameters Parameter Description region: Region3Target 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: numberVoxel 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 Type Description { [string]: any }Returns voxel data as a dictionary based on thechannelIdsinput. Keys represent each channel ID with their respective value as an array of 3D data.SolidMaterial— TheMaterialmaterial of the voxel. Note thatWateris not supported anymore; instead, a voxel that contains water will have a value ofLiquidOccupancy.SolidOccupancy— The occupancy of the voxel's material as specified in theSolidMaterialchannel. This is a value between 0 (empty) and 1 (full).LiquidOccupancy— Specifies the occupancy of theWatermaterial in a voxel as a value between 0 (no water) and 1 (full of water). If theSolidOccupancyis 1 and theSolidMaterialis notAir, this will be 0.
Sizekey with a value representing the 3D array size of each channel data.- Returns a certain region of smooth terrain in table format.
Parameters Parameter Description region: Region3Target 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: numberVoxel resolution. Must be4.Returns Type Description ...anyReturns raw voxel data as two 3D arrays.materials- 3D array ofMaterialfrom 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 Returns Type TerrainReadOperationTerrain:ReplaceMaterial(region: Region3,resolution: number,sourceMaterial: Enum.Material,targetMaterial: Enum.Material,) Replaces the terrain of a material within a region with another material.Parameters Parameter Description region: Region3The region in which the replacement operation will occur.resolution: numberThe resolution at which the replacement operation will take place; at the moment this must be exactly4.sourceMaterial: Enum.MaterialThe old material that shall be replaced.targetMaterial: Enum.MaterialThe new material.Terrain:ReplaceMaterialInTransform(cframe: CFrame,size: Vector3,sourceMaterial: Enum.Material,targetMaterial: Enum.Material,) Parameters Parameter cframe: CFramesize: Vector3sourceMaterial: Enum.MaterialtargetMaterial: Enum.MaterialTerrain:ReplaceMaterialInTransformSubregion(cframe: CFrame,size: Vector3,sourceMaterial: Enum.Material,targetMaterial: Enum.Material,targetRegion: Region3int16,) Parameters Parameter cframe: CFramesize: Vector3sourceMaterial: Enum.MaterialtargetMaterial: Enum.MaterialtargetRegion: Region3int16Terrain:ReplaceMaterialInTransformSubregionSlot(cframe: CFrame,size: Vector3,sourceMaterialIndex: number,targetMaterialIndex: number,targetRegion: Region3int16,) Parameters Parameter cframe: CFramesize: Vector3sourceMaterialIndex: numbertargetMaterialIndex: numbertargetRegion: Region3int16Terrain:ResetMaterialSlot( slotIndex: number) Parameters Parameter slotIndex: numberTerrain:SetMaterialColor( material: Enum.Material, value: Color3) Sets current terrain material color for specified terrain material.Parameters Parameter Description material: Enum.MaterialTheMaterialwhose terrain color to change.value: Color3TheColor3to apply as the new color tint for the material.Terrain:SetMaterialInTransform(cframe: CFrame,size: Vector3,targetMaterial: Enum.Material,) Parameters Parameter cframe: CFramesize: Vector3targetMaterial: Enum.MaterialTerrain:SetMaterialInTransformSubregion(cframe: CFrame,size: Vector3,targetMaterial: Enum.Material,targetRegion: Region3int16,) Parameters Parameter cframe: CFramesize: Vector3targetMaterial: Enum.MaterialtargetRegion: Region3int16Terrain:SetMaterialInTransformSubregionSlot(cframe: CFrame,size: Vector3,targetMaterialIndex: number,targetRegion: Region3int16,) Parameters Parameter cframe: CFramesize: Vector3targetMaterialIndex: numbertargetRegion: Region3int16Terrain:SetMaterialSlot(slotIndex: number,baseMaterial: Enum.Material,materialVariant: string,color: Color3,) Parameters Parameter slotIndex: numberbaseMaterial: Enum.MaterialmaterialVariant: stringcolor: Color3Returns Type ...anyReturns Type ...any- Returns the grid cell location that contains the position point.
- Returns the grid cell location that contains the position point, preferring empty grid cells when position is on a grid edge.
- Returns the grid cell location that contains the point position, preferring non-empty grid cells when position is on a grid edge.
Terrain:WriteVoxelChannels(region: Region3,resolution: number,channels: { [string]: any },) Sets a region of terrain using a dictionary of voxel channel data.Parameters Parameter Description region: Region3Target 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: numberVoxel resolution. Must be4.channels: { [string]: any }Dictionary of voxel data similar to the return value ofReadVoxelChannels(). 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— TheMaterialmaterial of the voxel. Note thatWateris not supported anymore; instead, a voxel that contains only water should be entered asSolidMaterial = Enum.Material.Air, LiquidOccupancy = x, wherexis a number between0(exclusive) and1(inclusive).SolidOccupancy— The occupancy of the voxel's material as specified in theSolidMaterialchannel. This should be a value between0(empty) and1(full).LiquidOccupancy— Specifies the occupancy of theWatermaterial in a voxel as a value between0(no water) and1(full of water). If theSolidOccupancyis 1 and theSolidMaterialis notAir, this will be0.
- Sets a certain region of smooth terrain using table format.
Parameters Parameter Description region: Region3Target region to write to. Must be aligned to the voxel grid. Will throw an error if region is too large.resolution: numberVoxel resolution. Must be4.materials: { any }3D array ofMaterial. Dimensions must exactly match the size of the target region in voxels.occupancy: { any }3D array of voxel occupancies (number between0and1). Dimensions must exactly match the size of the target region in voxels. Terrain:WriteVoxelsAsync_beta(region: Region3,resolution: number,channelIds: { any },): TerrainWriteOperation Returns Type TerrainWriteOperation- Deprecated: This item is a deprecated function of a legacy
Terrainengine that has been removed. Do not use it for new work.
Obsolete function which no longer does anything.Parameters Parameter Description x: numberThe X coordinate of the terrain cell.y: numberThe Y coordinate of the terrain cell.z: numberThe Z coordinate of the terrain cell.Returns Type Description booleanAlways returnstrue; the function no longer performs any operation. Terrain:AutowedgeCells( region: Region3int16) Deprecated: This item is a deprecated function of a legacyTerrainengine that has been removed. Do not use it for new work.
Obsolete function which no longer does anything.Parameters Parameter Description region: Region3int16TheRegion3int16specifying the region of terrain cells to process.- 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: This item is a deprecated function of a legacy
Terrainengine 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 Parameter Description x: numberThe X coordinate of the terrain cell.y: numberThe Y coordinate of the terrain cell.z: numberThe Z coordinate of the terrain cell.Returns Type Description ...anyA tuple containing the legacy cell material, block type, and orientation of the specified cell. - Deprecated: This item is a deprecated function of a legacy
Terrainengine that has been removed. Do not use it for new work.
Returnstrueif the cell is a water cell.Parameters Parameter Description x: numberThe X coordinate of the terrain cell.y: numberThe Y coordinate of the terrain cell.z: numberThe Z coordinate of the terrain cell.Returns Type Description ...anyA 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 legacyTerrainengine that has been removed. Do not use it for new work.
Sets the occupancy and material of a specific terrain voxel.Parameters Parameter Description x: numberThe X coordinate of the terrain cell.y: numberThe Y coordinate of the terrain cell.z: numberThe Z coordinate of the terrain cell.material: Enum.CellMaterialTheCellMaterialto set for the cell.block: Enum.CellBlockTheCellBlockshape type for the cell.orientation: Enum.CellOrientationTheCellOrientationrotation 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 legacyTerrainengine 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 Parameter Description region: Region3int16TheRegion3int16specifying the area of terrain cells to set.material: Enum.CellMaterialTheCellMaterialto apply to all cells in the region.block: Enum.CellBlockTheCellBlockshape type to apply to all cells in the region.orientation: Enum.CellOrientationTheCellOrientationrotation 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 legacyTerrainengine that has been removed. Do not use it for new work.
Sets the specified terrain voxel's material to water and sets its occupancy to1.Parameters Parameter Description x: numberThe X coordinate of the terrain cell.y: numberThe Y coordinate of the terrain cell.z: numberThe Z coordinate of the terrain cell.force: Enum.WaterForceTheWaterForcevalue representing the water force in the cell.direction: Enum.WaterDirectionTheWaterDirectionvalue representing the water flow direction.
No methods match the filters.
Events17
Object.Changed: RBXScriptSignal<( property: string)> Fires immediately after a property of the object changes, with some limitations.Parameters Parameter property: string
Instance.AncestryChanged: RBXScriptSignal<( child: Instance, parent: Instance)> Fires when theInstance.Parentproperty of this object or one of its ancestors is changed.Instance.AttributeChanged: RBXScriptSignal<( attribute: string)> Fires whenever an attribute is changed on theInstance.Parameters Parameter attribute: stringInstance.ChildAdded: RBXScriptSignal<( child: Instance)> Fires after an object is parented to thisInstance.Parameters Parameter child: InstanceInstance.ChildRemoved: RBXScriptSignal<( child: Instance)> Fires after a child is removed from thisInstance.Parameters Parameter child: InstanceInstance.DescendantAdded: RBXScriptSignal<( descendant: Instance)> Fires after a descendant is added to theInstance.Parameters Parameter descendant: InstanceInstance.DescendantRemoving: RBXScriptSignal<( descendant: Instance)> Fires immediately before a descendant of theInstanceis removed.Parameters Parameter descendant: Instance- Fires immediately before (or is deferred until after) the instance is destroyed via
Instance:Destroy(). - Fires whenever any style property is changed on the instance, including when a property is set to
nil. Instance.childAdded: RBXScriptSignal<( child: Instance)> Deprecated: This deprecated event is a variant ofInstance.ChildAddedwhich should be used instead.Parameters Parameter child: InstanceUse ChildAdded instead.
BasePart.NetworkOwnerChanged: RBXScriptSignal<( systemAddress: SystemAddress)> Parameters Parameter systemAddress: SystemAddressBasePart.Touched: RBXScriptSignal<( otherPart: BasePart)> Fires when a part touches another part as a result of physical movement.Parameters Parameter otherPart: BasePartBasePart.TouchEnded: RBXScriptSignal<( otherPart: BasePart)> Fires when a part stops touching another part as a result of physical movement.Parameters Parameter otherPart: BasePart- Deprecated: This event is deprecated in favor of
BasePart.Touched.
Fires on the local client when another part comes in contact with this part.Parameters Parameter part: BasePart - Deprecated: This event is deprecated. Do not use it for new work.
Fires when the part's appearance changes due to aShirt. BasePart.StoppedTouching: RBXScriptSignal<( otherPart: BasePart)> Deprecated: This event is deprecated in favor ofBasePart.TouchEnded, which should be used instead.
Fires on the local client when a part stops touching another part.Parameters Parameter otherPart: BasePartUse TouchEnded instead.
Defined byTerrain1
Terrain.GridBackendReloadRequired: RBXScriptSignal<( wouldUseNewGrid: boolean)> Parameters Parameter wouldUseNewGrid: boolean
No events match the filters.