---
name: EditableMesh
last_updated: 2026-06-11T23:11:56Z
inherits:
  - Object
type: class
memory_category: Instances
tags:
  - NotCreatable
summary: "Object which allows for the runtime creation and manipulation of meshes."
---

# Class: EditableMesh

> Object which allows for the runtime creation and manipulation of meshes.

## Description

`EditableMesh` changes the applied visual mesh when linked to a
[MeshPart](/docs/reference/engine/classes/MeshPart.md), allowing for querying and modification of the mesh both in
Studio and in experience.

#### Enabling for Published Experiences

For security purposes, using `EditableMesh` fails by default for published
experiences. To enable usage of `EditableMesh`, you must be 13+ age verified
and ID verified. After you are verified, open Studio's
[Experience Settings](/docs/en-us/studio/experience-settings.md), select
**Security**, and enable the **Allow&nbsp;Mesh&nbsp;&&nbsp;Image&nbsp;APIs**
toggle. Remember to review the
[Terms of Use](https://en.help.roblox.com/hc/en-us/articles/115004647846-Roblox-Terms-of-Use#creators-restrictions-on-use)
before enabling the toggle.

#### Permissions

To prevent misuse, [AssetService:CreateEditableMeshAsync()](/docs/reference/engine/classes/AssetService.md) only allows
you to load and edit mesh assets if any of the following is true:

- Owned by or explicitly shared with the experience owner.
- Owned by or explicitly shared with the logged in Studio user.
- Owned by or explicitly shared with the logged in player if the
  `EditableMesh` is on the client side.
- Owned by a group where the experience owner, Studio user, or player has a
  role with permission to edit the group's assets. See
  [Roles and permissions](/docs/en-us/projects/groups.md#roles-and-permissions)
  for more information.

See [Grant permissions](/docs/en-us/projects/assets/privacy.md#grant-permissions)
to learn how to share assets with users or groups.

The APIs throw an error if they are used to load an asset that does not meet
the criteria above.

#### Memory Limits

Editable assets are currently expensive for memory usage. To minimize its
impact on client performance, `EditableMesh` has strict client-side memory
budgets, although the server, Studio, and plugins operate with unlimited
memory. Using [FixedSize](/docs/reference/engine/classes/EditableMesh.md) may help you stay
within the memory budget and, in some scenarios, linking one `EditableMesh` to
multiple [MeshParts](/docs/reference/engine/classes/MeshPart.md) (multi-referencing) can help with memory
optimization.

#### Creation and Display

An `EditableMesh` can be created from an existing [Content](/docs/reference/engine/datatypes/Content.md) of a
[MeshPart](/docs/reference/engine/classes/MeshPart.md) or a mesh ID using
[AssetService:CreateEditableMeshAsync()](/docs/reference/engine/classes/AssetService.md), or a blank `EditableMesh` can
be created with [AssetService:CreateEditableMesh()](/docs/reference/engine/classes/AssetService.md). It can then be
displayed, modified, and its collision model updated. Not all of the steps are
necessary; for example, you might want to create an `EditableMesh` just to
raycast without ever displaying it.

```lua
local AssetService = game:GetService("AssetService")

-- Create empty EditableMesh
local editableMesh = AssetService:CreateEditableMesh()

-- Create EditableMesh from asset ID
local editableMeshFromAsset = nil
local success, errorMessage = pcall(function()
	editableMeshFromAsset = AssetService:CreateEditableMeshAsync(Content.fromAssetId(ASSET_ID))
end)

-- Create EditableMesh from another EditableMesh
local editableMeshFromAnother = nil
local success, errorMessage = pcall(function()
	editableMeshFromAnother = AssetService:CreateEditableMeshAsync(Content.fromObject(OTHER_EDITABLE_MESH))
end)

-- Create EditableMesh from MeshPart
local editableMeshFromMeshPart = nil
local success, errorMessage = pcall(function()
	editableMeshFromMeshPart = AssetService:CreateEditableMeshAsync(MESH_PART.MeshContent)
end)
```

An `EditableMesh` is displayed when it's linked to a new [MeshPart](/docs/reference/engine/classes/MeshPart.md),
through [AssetService:CreateMeshPartAsync()](/docs/reference/engine/classes/AssetService.md). You can create more
[MeshPart](/docs/reference/engine/classes/MeshPart.md) instances that reference the same `EditableMesh`
[Content](/docs/reference/engine/datatypes/Content.md), or link to an existing [MeshPart](/docs/reference/engine/classes/MeshPart.md) through
[MeshPart:ApplyMesh()](/docs/reference/engine/classes/MeshPart.md).

```lua
local AssetService = game:GetService("AssetService")
local Workspace = game:GetService("Workspace")

-- Create EditableMesh from asset ID
local editableMeshFromAsset = nil
local success, errorMessage = pcall(function()
	editableMeshFromAsset = AssetService:CreateEditableMeshAsync(Content.fromAssetId(ASSET_ID))
end)

-- Create new MeshPart linked to the EditableMesh
local newMeshPart = nil
local success, errorMessage = pcall(function()
	newMeshPart = AssetService:CreateMeshPartAsync(Content.fromObject(editableMeshFromAsset))
end)

-- Alternatively, link the new MeshPart created above to an existing MeshPart
local existingMeshPart = Workspace:FindFirstChild("EXISTING_MESH_PART")
existingMeshPart:ApplyMesh(newMeshPart)
```

To recalculate collision and fluid geometry after editing, you can again call
[AssetService:CreateMeshPartAsync()](/docs/reference/engine/classes/AssetService.md) and [MeshPart:ApplyMesh()](/docs/reference/engine/classes/MeshPart.md) to
update an existing [MeshPart](/docs/reference/engine/classes/MeshPart.md). It's generally recommended to do this at
the end of a conceptual edit, not after individual calls to methods that
manipulate geometry. Visual changes to the mesh will always be immediately
reflected by the engine, without the need to call
[AssetService:CreateMeshPartAsync()](/docs/reference/engine/classes/AssetService.md).

#### Fixed-Size Meshes

When creating an `EditableMesh` from an existing mesh asset (via
[AssetService:CreateEditableMeshAsync()](/docs/reference/engine/classes/AssetService.md)), the resulting editable mesh
is fixed-size by default. Fixed-size meshes are more efficient in terms of
memory but you cannot change the number of vertices, faces, or attributes.
Only the values of vertex attributes and positions can be edited.

```lua
local AssetService = game:GetService("AssetService")

-- Create EditableMesh without fixed-size default
local editableMeshFromAsset = nil
local success, errorMessage = pcall(function()
	editableMeshFromAsset = AssetService:CreateEditableMeshAsync(Content.fromAssetId(ASSET_ID), {FixedSize = false})
end)
```

#### Stable Vertex/Face IDs

Many `EditableMesh` methods take **vertex**, **normal**, **UV**, **color** and
**face** IDs. These are represented as integers in Luau but they require some
special handling. The main difference is that IDs are stable and they remain
the same even if other parts of the mesh change. For example, if an
`EditableMesh` has five vertices `{1, 2, 3, 4, 5}` and you remove vertex `4`,
the new vertices will be `{1, 2, 3, 5}`.

Note that the IDs are not guaranteed to be in order and there may be holes in
the numbering, so when iterating through vertices or faces, you should iterate
through the table returned by [GetVertices()](/docs/reference/engine/classes/EditableMesh.md)
or [GetFaces()](/docs/reference/engine/classes/EditableMesh.md).

#### Split Vertex Attributes

A **vertex** is a corner of a face, and topologically connects faces together.
Vertices can have several attributes: position, normal, UV coordinate, color,
and transparency.

Sometimes it's useful for all faces that touch a vertex to use the same
attribute values, but sometimes you'll want different faces to use different
attribute values on the same vertex. For example, on a smooth sphere, each
vertex will only have a single normal. In contrast, at the corner of a cube,
the vertex will have 3 different normals (one for each adjacent face). You can
also have seams in the UV coordinates or sharp changes in the vertex colors.

When creating faces, every vertex will by default have one of each attribute:
one normal, one UV coordinate, and one color/transparency. If you want to
create a seam, you should create new attributes and set them on the face. For
example, this code will create a sharp cube:

```lua
local AssetService = game:GetService("AssetService")

-- Given 4 vertex IDs, adds a new normal and 2 triangles, making a sharp quad
local function addSharpQuad(editableMesh, vid0, vid1, vid2, vid3)
	local nid = editableMesh:AddNormal()  -- This creates a normal ID which is automatically computed

	local fid1 = editableMesh:AddTriangle(vid0, vid1, vid2)
	editableMesh:SetFaceNormals(fid1, {nid, nid, nid})

	local fid2 = editableMesh:AddTriangle(vid0, vid2, vid3)
	editableMesh:SetFaceNormals(fid2, {nid, nid, nid})
end

-- Makes a cube with creased edges between the 6 sides
local function makeSharpCube()
	local editableMesh = AssetService:CreateEditableMesh()

	local v1 = editableMesh:AddVertex(Vector3.new(0, 0, 0))
	local v2 = editableMesh:AddVertex(Vector3.new(1, 0, 0))
	local v3 = editableMesh:AddVertex(Vector3.new(0, 1, 0))
	local v4 = editableMesh:AddVertex(Vector3.new(1, 1, 0))
	local v5 = editableMesh:AddVertex(Vector3.new(0, 0, 1))
	local v6 = editableMesh:AddVertex(Vector3.new(1, 0, 1))
	local v7 = editableMesh:AddVertex(Vector3.new(0, 1, 1))
	local v8 = editableMesh:AddVertex(Vector3.new(1, 1, 1))

	addSharpQuad(editableMesh, v5, v6, v8, v7)  -- Front
	addSharpQuad(editableMesh, v1, v3, v4, v2)  -- Back
	addSharpQuad(editableMesh, v1, v5, v7, v3)  -- Left
	addSharpQuad(editableMesh, v2, v4, v8, v6)  -- Right
	addSharpQuad(editableMesh, v1, v2, v6, v5)  -- Bottom
	addSharpQuad(editableMesh, v3, v7, v8, v4)  -- Top

	editableMesh:RemoveUnused()
	return editableMesh
end
```

#### Winding

Mesh faces have a front side and a back side. When drawing meshes, only the
front of the faces are drawn by default, although you can change this by
setting the mesh' [DoubleSided](/docs/reference/engine/classes/MeshPart.md) property to `true`.

The order of the vertices around the face determines whether you are looking
at the front or the back. The front of the face is visible when the vertices
go counterclockwise around it.

![Order of the vertices around the face](../../../assets/engine-api/classes/EditableMesh/Winding.png)

#### FACS Poses

Animatable heads use the Facial Action Coding System (FACS). See the
[FACS poses reference](/docs/en-us/art/characters/facial-animation/facs-poses-reference.md)
for helpful information when using
[GetFacsPoses()](/docs/reference/engine/classes/EditableMesh.md) and similar methods.

Each FACS pose is specified by an [FacsActionUnit](/docs/reference/engine/enums/FacsActionUnit.md) value. For the FACS
pose, virtual bones can each have a [CFrame](/docs/reference/engine/datatypes/CFrame.md) that transforms the
bones' initial [CFrame](/docs/reference/engine/datatypes/CFrame.md) in the bind pose of the mesh into the
[CFrame](/docs/reference/engine/datatypes/CFrame.md) for that FACS action unit's pose. All bone
[CFrames](/docs/reference/engine/datatypes/CFrame.md) are in the mesh's local space.

These FACS poses are blended together during animation. Sometimes, the
blending of the base poses produces poor results. In those cases, you can
override the blending of specific combinations of base poses with a
[corrective pose](/docs/en-us/art/characters/facial-animation/create-basic-heads.md#combination-poses)
that is more pleasing. A corrective pose is specified by 2 or 3
[FacsActionUnit](/docs/reference/engine/enums/FacsActionUnit.md) values. Like a base FACS pose, for a corrective pose,
virtual bones can each have a [CFrame](/docs/reference/engine/datatypes/CFrame.md) that transforms the bones'
initial [CFrame](/docs/reference/engine/datatypes/CFrame.md) in the bind pose of the mesh into the
[CFrame](/docs/reference/engine/datatypes/CFrame.md) for that FACS corrective.

Please note that corrective poses that operate on both left and right action
units are not currently expressible. For example, using `LeftCheekPuff` and
`RightEyeClosed` together in a corrective pose is not currently possible.

#### Limitations

`EditableMesh` currently has a limit of 60,000 vertices and 20,000 triangles.
Attempting to add too many vertices or triangles will cause an error.

## Properties

### Property: EditableMesh.FixedSize

```json
{
  "type": "boolean",
  "access": "ReadOnly",
  "security": {
    "read": "None",
    "write": "RobloxEngineSecurity"
  },
  "serialization": {
    "can_load": false,
    "can_save": true
  },
  "thread_safety": "ReadSafe",
  "category": "Data",
  "capabilities": [
    "DynamicGeneration"
  ]
}
```

Fixed-sized meshes allow changing the values of vertex attributes but do
not allow vertices and triangles to be added or deleted.

## Methods

### Method: EditableMesh:AddBone

**Signature:** `EditableMesh:AddBone(boneProperties: Dictionary): int64`

Adds a new bone and returns a stable bone ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `boneProperties` | `Dictionary` |  | Options table containing bone parameters:  - `Name` — A string that specifies the bone name. Note that all bone   names in a mesh must be unique. - `ParentId` — Optional bone ID of the new bone's parent. - `CFrame` — Initial [CFrame](/docs/reference/engine/datatypes/CFrame.md) of the bone in the bind pose of   the mesh, in the mesh's local space. - `Virtual` — Boolean that specifies whether this bone is virtual.   Virtual bones can only be bound to a [FaceControls](/docs/reference/engine/classes/FaceControls.md) instance. |

**Returns:** `int64` — Stable bone ID of the new bone.

### Method: EditableMesh:AddColor

**Signature:** `EditableMesh:AddColor(color: Color3, alpha: float): int64`

Adds a new color to the geometry and returns a stable color ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `color` | `Color3` |  | The new color. |
| `alpha` | `float` |  | The color alpha (transparency). |

**Returns:** `int64` — Stable color ID of the new color.

### Method: EditableMesh:AddNormal

**Signature:** `EditableMesh:AddNormal(normal: Vector3?): int64`

Adds a new normal to the geometry and returns a stable normal ID. If the
normal value isn't specified, the normal will be automatically calculated.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `normal` | `Vector3?` |  | The normal vector. If the normal value isn't specified, the normal will be automatically calculated. |

**Returns:** `int64` — Stable normal ID of the new normal.

### Method: EditableMesh:AddTriangle

**Signature:** `EditableMesh:AddTriangle(vertexId0: int64, vertexId1: int64, vertexId2: int64): int64`

Adds a new triangle to the mesh and returns a stable face ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId0` | `int64` |  | ID of the first vertex of the triangle. |
| `vertexId1` | `int64` |  | ID of the second vertex of the triangle. |
| `vertexId2` | `int64` |  | ID of the third vertex of the triangle. |

**Returns:** `int64` — Stable face ID of the new face.

### Method: EditableMesh:AddUV

**Signature:** `EditableMesh:AddUV(uv: Vector2): int64`

Adds a new UV to the geometry and returns a stable UV ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `uv` | `Vector2` |  | The new UV coordinate. |

**Returns:** `int64` — Stable UV ID of the new UV.

### Method: EditableMesh:AddVertex

**Signature:** `EditableMesh:AddVertex(p: Vector3): int64`

Adds a new vertex to the geometry and returns a stable vertex ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `p` | `Vector3` |  | Position in the mesh's local object space. |

**Returns:** `int64` — Stable vertex ID of the new vertex.

### Method: EditableMesh:Destroy

**Signature:** `EditableMesh:Destroy(): ()`

Destroys the contents of the mesh, immediately reclaiming used memory.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `()`

### Method: EditableMesh:FindClosestPointOnSurface

**Signature:** `EditableMesh:FindClosestPointOnSurface(point: Vector3): Tuple`

Finds the closest point on the mesh's surface. Returns the face ID, point
on the mesh in local object space, and the barycentric coordinate of the
position within the face. See
[RaycastLocal()](/docs/reference/engine/classes/EditableMesh.md) for more information on
barycentric coordinates.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `point` | `Vector3` |  | Point position in the mesh's local object space. |

**Returns:** `Tuple` — Tuple of the face ID, point on the mesh in local object space, and the
barycentric coordinate of the position within the face.

### Method: EditableMesh:FindClosestVertex

**Signature:** `EditableMesh:FindClosestVertex(toThisPoint: Vector3): int64`

Finds the closest vertex to a specific point in space and returns a stable
vertex ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `toThisPoint` | `Vector3` |  | Point position in the mesh's local object space. |

**Returns:** `int64` — Closest stable vertex ID to the specified point in space.

### Method: EditableMesh:FindVerticesWithinSphere

**Signature:** `EditableMesh:FindVerticesWithinSphere(center: Vector3, radius: float): Array`

Finds all vertices within a specific sphere and returns a list of stable
vertex IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `center` | `Vector3` |  | Center of the sphere in the mesh's local object space. |
| `radius` | `float` |  | Radius of the sphere. |

**Returns:** `Array` — List of stable vertex IDs within the requested sphere.

### Method: EditableMesh:GetAdjacentFaces

**Signature:** `EditableMesh:GetAdjacentFaces(faceId: int64): Array`

Given a stable face ID, returns a list of adjacent faces.

![Adjacent faces indicated around requested face](../../../assets/engine-api/classes/EditableMesh/GetAdjacentTriangles.png)

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `faceId` | `int64` |  |  |

**Returns:** `Array` — List of face IDs adjacent to the given face.

### Method: EditableMesh:GetAdjacentVertices

**Signature:** `EditableMesh:GetAdjacentVertices(vertexId: int64): Array`

Given a stable vertex ID, returns a list of adjacent vertices.

![Adjacent vertices indicated around requested vertex](../../../assets/engine-api/classes/EditableMesh/GetAdjacentVertices.png)

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Vertex ID around which to get adjacent vertices. |

**Returns:** `Array` — List of IDs of adjacent vertices around the given vertex ID.

### Method: EditableMesh:GetBoneByName

**Signature:** `EditableMesh:GetBoneByName(boneName: string): int64`

Finds the bone ID of the bone with the given name. Errors if no bone with
that name exists.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `boneName` | `string` |  | Bone name to search for. |

**Returns:** `int64` — Bone ID of the bone with the given name.

### Method: EditableMesh:GetBoneCFrame

**Signature:** `EditableMesh:GetBoneCFrame(boneId: int64): CFrame`

Returns the initial [CFrame](/docs/reference/engine/datatypes/CFrame.md) of the bone in the bind pose of the
mesh, in the mesh's local space.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `boneId` | `int64` |  | Bone ID for which to get the [CFrame](/docs/reference/engine/datatypes/CFrame.md). |

**Returns:** `CFrame` — Initial [CFrame](/docs/reference/engine/datatypes/CFrame.md) of the bone in the bind pose of the mesh, in
the mesh's local space.

### Method: EditableMesh:GetBoneIsVirtual

**Signature:** `EditableMesh:GetBoneIsVirtual(boneId: int64): boolean`

Returns `true` if the bone is virtual. Virtual bones can only be bound to
a [FaceControls](/docs/reference/engine/classes/FaceControls.md) instance.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `boneId` | `int64` |  | Bone ID for which to get whether the bone is virtual. |

**Returns:** `boolean` — Whether the bone with the given bone ID is virtual. Virtual bones can
only be bound to a [FaceControls](/docs/reference/engine/classes/FaceControls.md) instance.

### Method: EditableMesh:GetBoneName

**Signature:** `EditableMesh:GetBoneName(boneId: int64): string`

Returns the bone name.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `boneId` | `int64` |  | Bone ID for which to get the name. |

**Returns:** `string` — Name of the bone with the given bone ID.

### Method: EditableMesh:GetBoneParent

**Signature:** `EditableMesh:GetBoneParent(boneId: int64): int64`

Returns the parent bone ID, if any.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `boneId` | `int64` |  | Bone ID for which to get the parent. |

**Returns:** `int64` — Bone ID for the parent of the bone with the given bone ID. If there is
no parent, returns `0`.

### Method: EditableMesh:GetBones

**Signature:** `EditableMesh:GetBones(): Array`

Returns all bones of the mesh as a list of stable bone IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `Array` — List of stable bone IDs.

### Method: EditableMesh:GetCenter

**Signature:** `EditableMesh:GetCenter(): Vector3`

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `Vector3` — Center of the bounding box of the `EditableMesh`.

### Method: EditableMesh:GetColor

**Signature:** `EditableMesh:GetColor(colorId: int64): Color3?`

Returns the color for the given color ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `colorId` | `int64` |  | Color ID for which to get the color. |

**Returns:** `Color3?` — Color for the requested stable color ID.

### Method: EditableMesh:GetColorAlpha

**Signature:** `EditableMesh:GetColorAlpha(colorId: int64): float?`

Returns the color alpha (transparency) at the given stable color ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `colorId` | `int64` |  | Color ID for which to get the alpha. |

**Returns:** `float?` — Color alpha at the request stable color ID.

### Method: EditableMesh:GetColors

**Signature:** `EditableMesh:GetColors(): Array`

Returns all colors of the mesh as a list of stable color IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `Array` — List of stable color IDs.

### Method: EditableMesh:GetFaceColors

**Signature:** `EditableMesh:GetFaceColors(faceId: int64): Array`

Returns the face's color IDs for the vertices on the face.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `faceId` | `int64` |  | Face ID for which to get the color IDs. |

**Returns:** `Array` — List of color IDs used for the vertices on the given face.

### Method: EditableMesh:GetFaceNormals

**Signature:** `EditableMesh:GetFaceNormals(faceId: int64): Array`

Returns the face's normal IDs for the vertices on the face.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `faceId` | `int64` |  | Face ID for which to get the normal IDs. |

**Returns:** `Array` — List of normal IDs used for the vertices on the given face.

### Method: EditableMesh:GetFaces

**Signature:** `EditableMesh:GetFaces(): Array`

Returns all faces of the mesh as a list of stable face IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `Array` — List of stable face IDs.

### Method: EditableMesh:GetFacesWithColor

**Signature:** `EditableMesh:GetFacesWithColor(colorId: int64): Array`

Returns an array of face IDs that use the given color ID. Use together
with [GetVerticesWithColor()](/docs/reference/engine/classes/EditableMesh.md) to
obtain all face/vertex pairs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `colorId` | `int64` |  | Color ID to find faces for. |

**Returns:** `Array` — List of face IDs that use the provided color ID.

### Method: EditableMesh:GetFacesWithNormal

**Signature:** `EditableMesh:GetFacesWithNormal(normalId: int64): Array`

Returns an array of face IDs that use the given normal ID. Use together
with [GetVerticesWithNormal()](/docs/reference/engine/classes/EditableMesh.md)
to obtain all face/vertex pairs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `normalId` | `int64` |  | Normal ID to find faces for. |

**Returns:** `Array` — List of face IDs that use the provided normal ID.

### Method: EditableMesh:GetFacesWithUV

**Signature:** `EditableMesh:GetFacesWithUV(uvId: int64): Array`

Returns an array of face IDs that use the given UV ID. Use together with
[GetVerticesWithUV()](/docs/reference/engine/classes/EditableMesh.md) to obtain all
face/vertex pairs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `uvId` | `int64` |  | UV ID to find faces for. |

**Returns:** `Array` — List of face IDs that use the provided UV ID.

### Method: EditableMesh:GetFaceUVs

**Signature:** `EditableMesh:GetFaceUVs(faceId: int64): Array`

Returns the face's UV IDs for the vertices on the face.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `faceId` | `int64` |  | Face ID for which to get the UV IDs. |

**Returns:** `Array` — List of UV IDs used for the vertices on the given face.

### Method: EditableMesh:GetFaceVertices

**Signature:** `EditableMesh:GetFaceVertices(faceId: int64): Array`

Returns the face's vertex IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `faceId` | `int64` |  |  |

**Returns:** `Array` — List of vertex IDs around the given face.

### Method: EditableMesh:GetFacsCorrectivePose

**Signature:** `EditableMesh:GetFacsCorrectivePose(actions: Array): Tuple`

Returns bone IDs and bone [CFrames](/docs/reference/engine/datatypes/CFrame.md) for all bones in a
specific FACS corrective pose. Each bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) transforms the
bone from the initial bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) in the bind pose of the mesh
to the combined bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) for this pose. All
[CFrames](/docs/reference/engine/datatypes/CFrame.md) are in the mesh's local space.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `actions` | `Array` |  | Array or 2 or 3 [FacsActionUnit](/docs/reference/engine/enums/FacsActionUnit.md) values that specify a corrective pose. |

**Returns:** `Tuple` — Array of bone IDs and corresponding array of bone
[CFrames](/docs/reference/engine/datatypes/CFrame.md).

### Method: EditableMesh:GetFacsCorrectivePoses

**Signature:** `EditableMesh:GetFacsCorrectivePoses(): Array`

Returns all FACS corrective poses that are in use. Each corrective pose is
specified by 2 or 3 [FacsActionUnit](/docs/reference/engine/enums/FacsActionUnit.md) values.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `Array` — Array of corrective poses. Each corrective pose is specified by a
small array of 2 or 3 [FacsActionUnit](/docs/reference/engine/enums/FacsActionUnit.md) values.

### Method: EditableMesh:GetFacsPose

**Signature:** `EditableMesh:GetFacsPose(action: FacsActionUnit): Tuple`

Returns bone IDs and bone [CFrames](/docs/reference/engine/datatypes/CFrame.md) for all bones in a
specific FACS action unit. Each bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) transforms the bone
from the initial bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) in the bind pose of the mesh to
the combined bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) for this pose. All
[CFrames](/docs/reference/engine/datatypes/CFrame.md) are in the mesh's local space.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `action` | `FacsActionUnit` |  | FACS action unit for which to get the pose. |

**Returns:** `Tuple` — Array of bone IDs and corresponding array of bone [CFrame](/docs/reference/engine/datatypes/CFrame.md).

### Method: EditableMesh:GetFacsPoses

**Signature:** `EditableMesh:GetFacsPoses(): Array`

Returns all FACS action units that have poses defined.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `Array` — Array of [FacsActionUnit](/docs/reference/engine/enums/FacsActionUnit.md), one for each FACS action unit that has
a pose defined.

### Method: EditableMesh:GetNormal

**Signature:** `EditableMesh:GetNormal(normalId: int64): Vector3?`

Returns the normal vector for the given normal ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `normalId` | `int64` |  | Normal ID for which to get the normal vector. |

**Returns:** `Vector3?` — Normal vector at the requested normal ID.

### Method: EditableMesh:GetNormals

**Signature:** `EditableMesh:GetNormals(): Array`

Returns all normals of the mesh as a list of stable normal IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `Array` — List of stable normal IDs.

### Method: EditableMesh:GetPosition

**Signature:** `EditableMesh:GetPosition(vertexId: int64): Vector3`

Gets the position of a vertex in the mesh's local object space.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID for which to get the position. |

**Returns:** `Vector3` — Position of a vertex in the mesh's local object space.

### Method: EditableMesh:GetSize

**Signature:** `EditableMesh:GetSize(): Vector3`

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `Vector3` — Size of the `EditableMesh`.

### Method: EditableMesh:GetUV

**Signature:** `EditableMesh:GetUV(uvId: int64): Vector2?`

Returns UV coordinates at the given UV ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `uvId` | `int64` |  | UV ID for which to get the UV coordinate. |

**Returns:** `Vector2?` — UV coordinates at the requested UV ID.

### Method: EditableMesh:GetUVs

**Signature:** `EditableMesh:GetUVs(): Array`

Returns all UVs of the mesh as a list of stable UV IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `Array` — List of stable UV IDs.

### Method: EditableMesh:GetVertexBones

**Signature:** `EditableMesh:GetVertexBones(vertexId: int64): Array`

Returns all bone IDs that are associated with the vertex for skinning.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Vertex ID for which to get the associated bones. |

**Returns:** `Array` — Bone IDs associated with the vertex for skinning.

### Method: EditableMesh:GetVertexBoneWeights

**Signature:** `EditableMesh:GetVertexBoneWeights(vertexId: int64): Array`

Returns skinning blend weights for each bone that is associated with the
vertex.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Vertex ID for which to get the associated bone weights. |

**Returns:** `Array` — Skinning blend weights for each bone that is associated with the
vertex.

### Method: EditableMesh:GetVertexColors

**Signature:** `EditableMesh:GetVertexColors(vertexId: int64): Array`

Returns the color IDs of the faces attached to the given vertex.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID to find color IDs. |

**Returns:** `Array` — Array of color IDs of faces attached to the given vertex.

### Method: EditableMesh:GetVertexFaceColor

**Signature:** `EditableMesh:GetVertexFaceColor(vertexId: int64, faceId: int64): int64`

Returns the color ID of a vertex/face pair.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID. |
| `faceId` | `int64` |  | Stable face ID. |

**Returns:** `int64` — Stable color ID of the vertex/face pair.

### Method: EditableMesh:GetVertexFaceNormal

**Signature:** `EditableMesh:GetVertexFaceNormal(vertexId: int64, faceId: int64): int64`

Returns the normal ID of a vertex/face pair.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID. |
| `faceId` | `int64` |  | Stable face ID. |

**Returns:** `int64` — Stable normal ID of the vertex/face pair.

### Method: EditableMesh:GetVertexFaces

**Signature:** `EditableMesh:GetVertexFaces(vertexId: int64): Array`

Returns the face IDs of the faces attached to the given vertex.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID to find faces for. |

**Returns:** `Array` — Array of face IDs attached to the given vertex.

### Method: EditableMesh:GetVertexFaceUV

**Signature:** `EditableMesh:GetVertexFaceUV(vertexId: int64, faceId: int64): int64`

Returns the UV ID of a vertex/face pair.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID. |
| `faceId` | `int64` |  | Stable face ID. |

**Returns:** `int64` — Stable UV ID of the vertex/face pair.

### Method: EditableMesh:GetVertexNormals

**Signature:** `EditableMesh:GetVertexNormals(vertexId: int64): Array`

Returns the normal IDs of the faces attached to the given vertex.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID to find normal IDs. |

**Returns:** `Array` — Array of normal IDs of faces attached to the given vertex.

### Method: EditableMesh:GetVertexUVs

**Signature:** `EditableMesh:GetVertexUVs(vertexId: int64): Array`

Returns the UV IDs of the faces attached to the given vertex.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID to find UV IDs. |

**Returns:** `Array` — Array of UV IDs of faces attached to the given vertex.

### Method: EditableMesh:GetVertices

**Signature:** `EditableMesh:GetVertices(): Array`

Returns all vertices as a list of stable vertex IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `Array` — List of stable vertex IDs.

### Method: EditableMesh:GetVerticesWithColor

**Signature:** `EditableMesh:GetVerticesWithColor(colorId: int64): Array`

Returns an array of vertex IDs that use the given color ID. Use together
with [GetFacesWithColor()](/docs/reference/engine/classes/EditableMesh.md) to
obtain all face/vertex pairs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `colorId` | `int64` |  | Color ID to find faces for. |

**Returns:** `Array` — List of face IDs that use the provided color ID.

### Method: EditableMesh:GetVerticesWithNormal

**Signature:** `EditableMesh:GetVerticesWithNormal(normalId: int64): Array`

Returns an array of vertex IDs that use the given normal ID. Use together
with [GetFacesWithNormal()](/docs/reference/engine/classes/EditableMesh.md) to
obtain all face/vertex pairs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `normalId` | `int64` |  | Normal ID to find vertices for. |

**Returns:** `Array` — List of vertex IDs that use the provided normal ID.

### Method: EditableMesh:GetVerticesWithUV

**Signature:** `EditableMesh:GetVerticesWithUV(uvId: int64): Array`

Returns an array of vertex IDs that use the given UV ID. Use together with
[GetFacesWithUV()](/docs/reference/engine/classes/EditableMesh.md) to obtain all
face/vertex pairs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `uvId` | `int64` |  | UV ID to find vertices for. |

**Returns:** `Array` — List of vertex IDs that use the provided UV ID.

### Method: EditableMesh:IdDebugString

**Signature:** `EditableMesh:IdDebugString(id: int64): string`

Returns a string describing a stable ID, useful for debugging purposes,
like `f17` or `v12`, containing the type, ID number, and version.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `id` | `int64` |  | ID for which to return a debugging information string. |

**Returns:** `string` — String that describes the ID in human-readable format.

### Method: EditableMesh:MergeVertices

**Signature:** `EditableMesh:MergeVertices(mergeTolerance: float): Map`

Merges vertices that touch together, to use a single vertex ID but keep
the other original attribute IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `mergeTolerance` | `float` |  | The distance at which the vertices are considered to touch each other. |

**Returns:** `Map` — A mapping of old vertex ID to new vertex ID for vertices that have
been merged.

### Method: EditableMesh:RaycastLocal

**Signature:** `EditableMesh:RaycastLocal(origin: Vector3, direction: Vector3): Tuple`

Casts a ray and returns a point of intersection, face ID, and barycentric
coordinates. The inputs and outputs of this method are in the mesh's local
object space.

A **barycentric coordinate** is a way of specifying a point within a face
as a weighted combination of the 3 vertices of the face. This is useful as
a general way of blending vertex attributes. See this method's code sample
as an illustration.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `origin` | `Vector3` |  | Origin of the ray in the mesh's local object space. |
| `direction` | `Vector3` |  | Direction of the ray. |

**Returns:** `Tuple` — Tuple of the point of intersection, face ID, and barycentric
coordinates.

**EditableMesh:RaycastLocal()**

This code finds the position and UV coordinates of the closest point on an
[EditableMesh](/docs/reference/engine/classes/EditableMesh.md) to the input point.

```lua
local AssetService = game:GetService("AssetService")
local Workspace = game:GetService("Workspace")

-- Initialize EditableMesh in space
local editableMesh = nil
local success, errorMsg = pcall(function()
	editableMesh = AssetService:CreateEditableMeshAsync(Content.fromUri("rbxassetid://ASSET_ID"))
end)

local meshPart = nil
if success and editableMesh then
	meshPart = AssetService:CreateMeshPartAsync(
		Content.fromObject(editableMesh),
		{ CollisionFidelity = Enum.CollisionFidelity.Hull }
	)
	meshPart.Parent = Workspace
else
	warn(errorMsg)
end

-- Function that will cast a ray from the given point, returning the world point of the hit and the UV coordinate
local function castRayFromCamera(meshPart: MeshPart, editableMesh: EditableMesh, viewportPoint: Vector3)
	if not meshPart then
		return
	end

	-- Calculate how much the object is being scaled in each dimension
	local renderScale = meshPart.Size / meshPart.MeshSize

	-- Create ray from camera along the direction of a clicked point
	local ray = Workspace.CurrentCamera:ViewportPointToRay(viewportPoint.X, viewportPoint.Y)

	-- Convert to object space to use with RaycastLocal()
	local relativeOrigin = meshPart.CFrame:PointToObjectSpace(ray.Origin) / renderScale
	local relativeTarget = meshPart.CFrame:PointToObjectSpace(ray.Origin + ray.Direction * 100) / renderScale
	local relativeDirection = relativeTarget - relativeOrigin

	local faceId, point, barycentricCoordinate, vertId1, vertId2, vertId3 =
		editableMesh:RaycastLocal(relativeOrigin, relativeDirection)

	if not faceId then
		-- Didn't hit any faces
		return
	end

	-- Compute the hit point in world space
	local worldHitPoint = meshPart.CFrame:PointToWorldSpace(point * renderScale)

	-- Get the UVs on the face
	local uvId1 = editableMesh:GetVertexFaceUV(vertId1, faceId)
	local uvId2 = editableMesh:GetVertexFaceUV(vertId2, faceId)
	local uvId3 = editableMesh:GetVertexFaceUV(vertId3, faceId)

	local uv1 = editableMesh:GetUV(uvId1)
	local uv2 = editableMesh:GetUV(uvId2)
	local uv3 = editableMesh:GetUV(uvId3)

	-- Interpolate UVs within the face based on the barycentric coordinate
	local u = (barycentricCoordinate.x * uv1.x) + (barycentricCoordinate.y * uv2.x) + (barycentricCoordinate.z * uv3.x)
	local v = (barycentricCoordinate.x * uv1.y) + (barycentricCoordinate.y * uv2.y) + (barycentricCoordinate.z * uv3.y)

	return worldHitPoint, Vector2.new(u, v)
end
```

### Method: EditableMesh:RemoveBone

**Signature:** `EditableMesh:RemoveBone(boneId: int64): ()`

Removes a bone using its stable bone ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `boneId` | `int64` |  |  |

**Returns:** `()`

### Method: EditableMesh:RemoveFace

**Signature:** `EditableMesh:RemoveFace(faceId: int64): ()`

Removes a face using its stable face ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `faceId` | `int64` |  |  |

**Returns:** `()`

### Method: EditableMesh:RemoveUnused

**Signature:** `EditableMesh:RemoveUnused(): Array`

Removes all vertices, normals, UVs, and colors which are not used in any
face, and returns the removed IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `Array` — All of the removed stable IDs.

### Method: EditableMesh:ResetNormal

**Signature:** `EditableMesh:ResetNormal(normalId: int64): ()`

Reset this normal ID to be automatically calculated based on the shape of
the mesh, instead of manually set.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `normalId` | `int64` |  | Stable normal ID to reset. |

**Returns:** `()`

### Method: EditableMesh:SetBoneCFrame

**Signature:** `EditableMesh:SetBoneCFrame(boneId: int64, cframe: CFrame): ()`

Set the initial [CFrame](/docs/reference/engine/datatypes/CFrame.md) for a bone in the mesh's bind pose, in
the mesh's local space.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `boneId` | `int64` |  | Bone ID for which to set the initial [CFrame](/docs/reference/engine/datatypes/CFrame.md). |
| `cframe` | `CFrame` |  | Initial [CFrame](/docs/reference/engine/datatypes/CFrame.md) for the bone in the mesh's bind pose, in the mesh's local space. |

**Returns:** `()`

### Method: EditableMesh:SetBoneIsVirtual

**Signature:** `EditableMesh:SetBoneIsVirtual(boneId: int64, virtual: boolean): ()`

Set whether a bone is virtual. Virtual bones can only be bound to a
[FaceControls](/docs/reference/engine/classes/FaceControls.md) instance.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `boneId` | `int64` |  | Bone ID for which to set whether the bone is virtual. |
| `virtual` | `boolean` |  | Whether the bone should be virtual. |

**Returns:** `()`

### Method: EditableMesh:SetBoneName

**Signature:** `EditableMesh:SetBoneName(boneId: int64, name: string): ()`

Sets the name for a bone. Bone names can be 100 characters long and must
be unique in the mesh.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `boneId` | `int64` |  | Bone ID for which to set the name. |
| `name` | `string` |  | Bone name to set. |

**Returns:** `()`

### Method: EditableMesh:SetBoneParent

**Signature:** `EditableMesh:SetBoneParent(boneId: int64, parentBoneId: int64): ()`

Set a parent for a bone.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `boneId` | `int64` |  | Bone ID for which to set the parent. |
| `parentBoneId` | `int64` |  | Parent bone ID. |

**Returns:** `()`

### Method: EditableMesh:SetColor

**Signature:** `EditableMesh:SetColor(colorId: int64, color: Color3): ()`

Sets the color for a color ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `colorId` | `int64` |  | Stable color ID for which to set the color. |
| `color` | `Color3` |  | Color to set. |

**Returns:** `()`

### Method: EditableMesh:SetColorAlpha

**Signature:** `EditableMesh:SetColorAlpha(colorId: int64, alpha: float): ()`

Sets the color alpha (transparency) for a color ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `colorId` | `int64` |  | Stable color ID for which to set the color alpha. |
| `alpha` | `float` |  | Alpha to set. |

**Returns:** `()`

### Method: EditableMesh:SetFaceColors

**Signature:** `EditableMesh:SetFaceColors(faceId: int64, ids: Array): ()`

Sets the face's vertex colors to new color IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `faceId` | `int64` |  | Face ID for which to update the vertex colors. |
| `ids` | `Array` |  | List of new stable color IDs to use for the given face's vertices. |

**Returns:** `()`

### Method: EditableMesh:SetFaceNormals

**Signature:** `EditableMesh:SetFaceNormals(faceId: int64, ids: Array): ()`

Sets the face's vertex normals to new normal IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `faceId` | `int64` |  | Face ID for which to update the vertex normals. |
| `ids` | `Array` |  | List of new stable normal IDs to use for the given face's vertices. |

**Returns:** `()`

### Method: EditableMesh:SetFaceUVs

**Signature:** `EditableMesh:SetFaceUVs(faceId: int64, ids: Array): ()`

Sets the face's vertex UVs to new UV IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `faceId` | `int64` |  | Face ID for which to update the vertex UVs. |
| `ids` | `Array` |  | List of new stable UV IDs to use for the given face's vertices. |

**Returns:** `()`

### Method: EditableMesh:SetFaceVertices

**Signature:** `EditableMesh:SetFaceVertices(faceId: int64, ids: Array): ()`

Sets the face's vertices to new vertex IDs.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `faceId` | `int64` |  | Face ID for which to update the vertices. |
| `ids` | `Array` |  | List of new stable vertex IDs to use for the given face. |

**Returns:** `()`

### Method: EditableMesh:SetFacsBonePose

**Signature:** `EditableMesh:SetFacsBonePose(action: FacsActionUnit, boneId: int64, cframe: CFrame): ()`

Set [CFrame](/docs/reference/engine/datatypes/CFrame.md) for an individual bone in a specific FACS action
unit.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `action` | `FacsActionUnit` |  | FACS action unit for which to set the pose. |
| `boneId` | `int64` |  | Bone to set a [CFrame](/docs/reference/engine/datatypes/CFrame.md) for this pose. |
| `cframe` | `CFrame` |  | [CFrame](/docs/reference/engine/datatypes/CFrame.md) which transforms the bone from the initial bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) in the bind pose of the mesh to the combined bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) for this pose. All [CFrames](/docs/reference/engine/datatypes/CFrame.md) are in the mesh's local space. |

**Returns:** `()`

### Method: EditableMesh:SetFacsCorrectivePose

**Signature:** `EditableMesh:SetFacsCorrectivePose(actions: Array, boneIds: Array, cframes: Array): ()`

Set pose for all bones in a specific FACS corrective pose.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `actions` | `Array` |  | Array or 2 or 3 [FacsActionUnit](/docs/reference/engine/enums/FacsActionUnit.md) values to apply as a corrective pose. |
| `boneIds` | `Array` |  | Bones to set a [CFrame](/docs/reference/engine/datatypes/CFrame.md) for this pose. |
| `cframes` | `Array` |  | [CFrame](/docs/reference/engine/datatypes/CFrame.md) transforms for the bones in this corrective pose.  Each bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) transforms the bone from the initial bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) in the bind pose of the mesh to the combined bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) for this pose. All [CFrames](/docs/reference/engine/datatypes/CFrame.md) are in the mesh's local space. |

**Returns:** `()`

### Method: EditableMesh:SetFacsPose

**Signature:** `EditableMesh:SetFacsPose(action: FacsActionUnit, boneIds: Array, cframes: Array): ()`

Set pose for all bones in a specific FACS action unit.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `action` | `FacsActionUnit` |  | FACS action unit to set the pose for. |
| `boneIds` | `Array` |  | Bones for which to set a [CFrame](/docs/reference/engine/datatypes/CFrame.md) for this pose. |
| `cframes` | `Array` |  | [CFrame](/docs/reference/engine/datatypes/CFrame.md) transforms for the bones in this pose.  Each bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) transforms the bone from the initial bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) in the bind pose of the mesh to the combined bone [CFrame](/docs/reference/engine/datatypes/CFrame.md) for this pose. All [CFrames](/docs/reference/engine/datatypes/CFrame.md) are in the mesh's local space. |

**Returns:** `()`

### Method: EditableMesh:SetNormal

**Signature:** `EditableMesh:SetNormal(normalId: int64, normal: Vector3): ()`

Set the normal for a normal ID. This will change the normal value for
every face vertex which is using the normal ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `normalId` | `int64` |  | Stable normal ID for which to set the normal vector. |
| `normal` | `Vector3` |  | Normal vector to set. |

**Returns:** `()`

### Method: EditableMesh:SetPosition

**Signature:** `EditableMesh:SetPosition(vertexId: int64, p: Vector3): ()`

Sets a vertex position in the mesh's local object space.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID of the vertex to position. |
| `p` | `Vector3` |  | Position in the mesh's local object space. |

**Returns:** `()`

### Method: EditableMesh:SetUV

**Signature:** `EditableMesh:SetUV(uvId: int64, uv: Vector2): ()`

Sets UV coordinates for a UV ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `uvId` | `int64` |  | UV ID for which to set the UV coordinates. |
| `uv` | `Vector2` |  | UV coordinates. |

**Returns:** `()`

### Method: EditableMesh:SetVertexBones

**Signature:** `EditableMesh:SetVertexBones(vertexId: int64, boneIDs: Array): ()`

Assign a list of bones with the vertex for skinning.

Corresponds with the skinning blend weights used in
[SetVertexBoneWeights()](/docs/reference/engine/classes/EditableMesh.md). In
other words,
[GetVertexBoneWeights(vertexId)[i]](/docs/reference/engine/classes/EditableMesh.md)
is the weight on this vertex for
[GetVertexBones(vertexId)[i]](/docs/reference/engine/classes/EditableMesh.md).

This method should be called before calling
[SetVertexBoneWeights()](/docs/reference/engine/classes/EditableMesh.md).

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Vertex ID to set vertex skinning bones. |
| `boneIDs` | `Array` |  | Bone IDs to use with this vertex for skinning. |

**Returns:** `()`

### Method: EditableMesh:SetVertexBoneWeights

**Signature:** `EditableMesh:SetVertexBoneWeights(vertexId: int64, boneWeights: Array): ()`

Sets skinning blend weights for each bone associated with the vertex.

Corresponds with the bone IDs used in
[SetVertexBones()](/docs/reference/engine/classes/EditableMesh.md). In other words,
[GetVertexBoneWeights(vertexId)[i]](/docs/reference/engine/classes/EditableMesh.md)
is the weight on this vertex for
[GetVertexBones(vertexId)[i]](/docs/reference/engine/classes/EditableMesh.md).

This method should be called after calling
[SetVertexBones()](/docs/reference/engine/classes/EditableMesh.md).

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Vertex ID on which to set skinning blend weights. |
| `boneWeights` | `Array` |  | Skinning blend weights to set on the vertex. |

**Returns:** `()`

### Method: EditableMesh:SetVertexFaceColor

**Signature:** `EditableMesh:SetVertexFaceColor(vertexId: int64, faceId: int64, colorId: int64): ()`

Sets the color ID of a vertex/face pair.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID. |
| `faceId` | `int64` |  | Stable face ID. |
| `colorId` | `int64` |  | Stable color ID to set for the vertex/face pair. |

**Returns:** `()`

### Method: EditableMesh:SetVertexFaceNormal

**Signature:** `EditableMesh:SetVertexFaceNormal(vertexId: int64, faceId: int64, normalId: int64): ()`

Sets the normal ID of a vertex/face pair.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID. |
| `faceId` | `int64` |  | Stable face ID. |
| `normalId` | `int64` |  | Stable normal ID to set for the vertex/face pair. |

**Returns:** `()`

### Method: EditableMesh:SetVertexFaceUV

**Signature:** `EditableMesh:SetVertexFaceUV(vertexId: int64, faceId: int64, uvId: int64): ()`

Sets the UV ID of a vertex/face pair.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `vertexId` | `int64` |  | Stable vertex ID. |
| `faceId` | `int64` |  | Stable face ID. |
| `uvId` | `int64` |  | Stable UV ID to set for the vertex/face pair. |

**Returns:** `()`

### Method: EditableMesh:Triangulate

**Signature:** `EditableMesh:Triangulate(): ()`

Splits all faces on the mesh to be triangles. Currently this does nothing
since only triangles can be created, but if your code relies on triangles,
it's recommended that you call this method after calling
[AssetService:CreateEditableMeshAsync()](/docs/reference/engine/classes/AssetService.md).

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Returns:** `()`

### Method: EditableMesh:GetFacesWithAttribute

**Signature:** `EditableMesh:GetFacesWithAttribute(id: int64): Array`

Returns a list of faces that use a given vertex ID, normal ID, UV ID, or
color ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `id` | `int64` |  | Attribute ID for which to find faces that use it. |

**Returns:** `Array` — List of face IDs which use the given attribute ID.

### Method: EditableMesh:GetVerticesWithAttribute

**Signature:** `EditableMesh:GetVerticesWithAttribute(id: int64): Array`

Returns a list of vertices that use a given face ID, normal ID, UV ID, or
color ID.

*Security: None · Thread Safety: Unsafe · Capabilities: DynamicGeneration*

**Parameters:**

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `id` | `int64` |  | Attribute ID for which to find vertices that use it. |

**Returns:** `Array` — List of vertex IDs which use the given attribute ID.

## Inherited Members

### From [Object](/docs/reference/engine/classes/Object.md)

- **Property `ClassName`** (`string`): A read-only string representing the class this Object belongs to.
- **Property `className`** (`string`):  *(deprecated)*
- **Method `GetPropertyChangedSignal(property: string): RBXScriptSignal`**: Get an event that fires when a given property of the object changes.
- **Method `IsA(className: string): boolean`**: Returns true if an object's class matches or inherits from a given class.
- **Method `isA(className: string): boolean`**:  *(deprecated)*
- **Event `Changed`**: Fires immediately after a property of the object changes, with some