Skip to content
Roblox API Reference

GeometryService

Service containing geometric operations.
  • Not creatable
  • Service
Memory category
Instances
Own members
11
Inherited members
75
Subclasses
0
Siblings
608

Properties23

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Methods53

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
Defined byGeometryService11
  • GeometryService:CalculateConstraintsToPreserve(source: Instance,destination: { any },options: { [string]: any }? = nil,): { any }
    Returns a table of Constraints and Attachments which you may choose to preserve, along with their respective parents.
    • Capabilities: CSG
    Parameters
    ParameterDescription
    source: Instance
    An original object that the solid modeling operation was performed on, for example part in UnionAsync().
    destination: { any }
    Array of resulting BaseParts from the solid modeling operation, for example the results of UnionAsync().
    options: { [string]: any }? = nil
    Options dictionary for the method:
    • tolerance — The distance tolerance, in regards to Attachment preservation, between the attachment and the closest point on the original part's surface versus the closest point on the resulting part's surface. If the resulting distance following the solid modeling operation is greater than this value, the Parent of attachments and their associated constraints will be nil in the returned recommendation table.
    • weldConstraintPreserve — A WeldConstraintPreserve enum value describing how WeldConstraints are preserved in the resulting recommendation table.
    • dropAttachmentsWithoutConstraints — Boolean with default of true. If set to false, Attachments that have no Constraints will be preserved.
    Returns
    TypeDescription
    { any }
    Table containing information for general case Constraints, NoCollisionConstraints, and WeldConstraints. In cases where an Attachment or Constraint should be dropped, its respective parent will be nil. For general case Constraints such as HingeConstraint: Key Type AttachmentClass.AttachmentConstraintClass.Constraint or nilAttachmentParentClass.BasePart or nilConstraintParentClass.BasePart or nil For WeldConstraints: Key Type WeldConstraintClass.WeldConstraintWeldConstraintParentClass.BasePart or nilWeldConstraintPart0Class.BasePartWeldConstraintPart1Class.BasePart For NoCollisionConstraints: Key Type NoCollisionConstraintClass.NoCollisionConstraintNoCollisionConstraintParentClass.BasePart or nilNoCollisionConstraintPart0Class.BasePartNoCollisionConstraintPart1Class.BasePart
  • GeometryService:CreateBasicMeshPart(shape: Enum.BasicMeshPartShape,options: { [string]: any }? = nil,): MeshPart
    • Capabilities: CSG + InternalTest
    Parameters
    Parameter
    shape: Enum.BasicMeshPartShape
    options: { [string]: any }? = nil
    Returns
    Type
    MeshPart
  • GeometryService:FragmentAsync(part: BasePart,sites: { any },options: { [string]: any }? = nil,): { any }
    Breaks a BasePart into multiple MeshPart instances, according to the pattern of points passed in, by using voronoi decomposition.
    • Yields
    • Capabilities: CSG
    Parameters
    ParameterDescription
    part: BasePart
    A Part, PartOperation, or MeshPart to operate on.
    sites: { any }
    Array of Vector3 defining the site positions. Each site will become a separate part. You can also provide a jagged 2D array of Vector3 by including inner arrays of Vector3 as elements of the outer array. Each inner array will have all of its voronoi cells merged into a single part. GeometryService:GenerateFragmentSites can be used to easily create this input.
    options: { [string]: any }? = nil
    Options table containing all the controls for the method:
    • CollisionFidelity — The value of CollisionFidelity in the resulting parts, with one caveat: If a 2D array of sites is provided, this collision fidelity will only be applied to parts which came from more than one site. The others will be given Hull precision.
    • RenderFidelity — The value of RenderFidelity in the resulting parts.
    • FluidFidelity — The value of FluidFidelity in the resulting parts.
    • SplitApart — Boolean controlling whether a part should be split into multiple parts if it contains multiple connected components. Default is true (split).
    Returns
    TypeDescription
    { any }
    Array of MeshPart along with mapping info. Each array element is a Dictionary with two elements: { "Instance": instance, "Index": index }. Index is the index in the outer array of sites; in other words, it tells you which group of sites this instance came from. Note that it is possible for multiple instances to have the same index, if SplitApart is true.
  • GeometryService:GenerateFragmentSites(part: BasePart,options: { [string]: any }? = nil,): { any }
    Provides an array of positions which can easily be passed into FragmentAsync to perform simple types of destruction.
    • Capabilities: CSG
    Parameters
    ParameterDescription
    part: BasePart
    The Part, PartOperation, or MeshPart which you are planning to pass into FragmentAsync(). This is necessary to make the fragment site generation and the subsequent FragmentAsync() call efficient.
    options: { [string]: any }? = nil
    Options table containing all the controls for the method:
    • SiteSpacing — The approximate distance between sites, which directly corresponds to the diameter of the resulting fragments. If not specified, a reasonable value will be chosen.
    • Origin — If provided, this will be the center of the area to be fragmented. If not provided, the entire object will be fragmented.
    • Radius — If provided, this will be the center of the area to be fragmented. Either Origin and Radius should both be provided, or neither.
    Returns
    TypeDescription
    { any }
    An array of Vector3 which is typically passed into FragmentAsync(). The output depends on the options provided. If Origin and Radius are provided, then the output array will contain several Vector3 elements which will all be located within the radius, but the first element of the array will be an inner array containing many Vector3 sites which are outside the radius. If Origin and Radius are not provided, the output will simply be an array of Vector3 positions within the extents of the input part.
  • GeometryService:HashMeshAsync(meshId: string): string
    • Yields
    • Roblox script security
    • Capabilities: CSG
    Parameters
    Parameter
    meshId: string
    Returns
    Type
    string
  • GeometryService:IntersectAsync(part: Instance,parts: { any },options: { [string]: any }? = nil,): { any }
    Creates one or more PartOperations or MeshParts from the intersecting geometry of multiple parts.
    • Yields
    • Capabilities: CSG
    Parameters
    ParameterDescription
    part: Instance
    Main Part, PartOperation, or MeshPart to operate on.
    parts: { any }
    Array of other parts to intersect with the main part.
    options: { [string]: any }? = nil
    Options table containing all the controls for the method:
    • CollisionFidelity — The value of CollisionFidelity in the resulting parts.
    • RenderFidelity — The value of RenderFidelity or RenderFidelity in the resulting parts.
    • FluidFidelity — The value of FluidFidelity in the resulting parts.
    • SplitApart — Boolean controlling whether the objects should all be kept together or properly split apart. Default is true (split).
    Returns
    TypeDescription
    { any }
    One or more PartOperations or MeshParts. If the input contained any MeshParts, then the results will always be MeshParts.
  • GeometryService:SubtractAsync(part: Instance,parts: { any },options: { [string]: any }? = nil,): { any }
    Creates one or more PartOperations or MeshParts from one part minus the space occupied by other parts.
    • Yields
    • Capabilities: CSG
    Parameters
    ParameterDescription
    part: Instance
    Main Part, PartOperation, or MeshPart to operate on.
    parts: { any }
    Array of parts to subtract from the main part.
    options: { [string]: any }? = nil
    Options table containing all the controls for the method:
    • CollisionFidelity — The value of CollisionFidelity in the resulting parts.
    • RenderFidelity — The value of RenderFidelity or RenderFidelity in the resulting parts.
    • FluidFidelity — The value of FluidFidelity in the resulting parts.
    • SplitApart — Boolean controlling whether the objects should all be kept together or properly split apart. Default is true (split).
    Returns
    TypeDescription
    { any }
    One or more PartOperations or MeshParts. If the input contained any MeshParts, then the results will always be MeshParts.
  • GeometryService:SweepPartAsync(part: BasePart,cframes: { any },options: { [string]: any }? = nil,): MeshPart
    Creates a MeshPart which has the shape of the input part stretched/dragged through the given set of CFrame positions.
    • Yields
    • Capabilities: CSG
    Parameters
    ParameterDescription
    part: BasePart
    A Part, PartOperation, or MeshPart to operate on.
    cframes: { any }
    Array of coordinate frames to sweep parts through.
    options: { [string]: any }? = nil
    Options table containing all the controls for the method:
    • CollisionFidelity — The value of CollisionFidelity in the resulting parts.
    • RenderFidelity — The value of RenderFidelity in the resulting parts.
    • FluidFidelity — The value of FluidFidelity in the resulting parts.
    Returns
    TypeDescription
    MeshPart
    A new MeshPart with the swept geometry.
  • GeometryService:TranscodeMesh(instance: Instance)
    • Roblox script security
    • Capabilities: CSG
    Parameters
    Parameter
    instance: Instance
  • GeometryService:TranscodeModel(instance: Instance): { any }
    • Roblox script security
    • Capabilities: CSG
    Parameters
    Parameter
    instance: Instance
    Returns
    Type
    { any }
  • GeometryService:UnionAsync(part: Instance,parts: { any },options: { [string]: any }? = nil,): { any }
    Creates one or more PartOperations or MeshParts from one part plus the space occupied by other parts.
    • Yields
    • Capabilities: CSG
    Parameters
    ParameterDescription
    part: Instance
    Main Part, PartOperation, or MeshPart to operate on.
    parts: { any }
    Array of parts to union with the main part.
    options: { [string]: any }? = nil
    Options table containing all the controls for the method:
    • CollisionFidelity — The value of CollisionFidelity in the resulting parts.
    • RenderFidelity — The value of RenderFidelity or RenderFidelity in the resulting parts.
    • FluidFidelity — The value of FluidFidelity in the resulting parts.
    • SplitApart — Boolean controlling whether the objects should all be kept together or properly split apart. Default is true (split).
    Returns
    TypeDescription
    { any }
    One or more PartOperations or MeshParts. If the input contained any MeshParts, then the results will always be MeshParts.

Events10

Inherited fromObject1
Inherited fromInstance9