MeshPart
MeshPart : BasePart
Overview
This object represents a custom mesh based on BasePart, which is simulated in the physics engine based on the mesh's shape.
The MeshId and TextureID properties determines the shape and texture of MeshPart.
Properties
DoubleSided
bool
This property determines whether the mesh is rendered on both faces.
For cases like paper, leaves, or thin metal plates that need to be visible from both sides, setting this property to true renders both the front and back faces of the mesh, ensuring the surface is visible from any direction.
However, as double-sided rendering can increase load on GPU, it should only be used when necessary.
Code Samples
local MeshPart = script.Parent
print(MeshPart.DoubleSided)
MeshId
string
This property sets the mesh asset to be displayed on the MeshPart.
Code Samples
local MeshPart = script.Parent
print(MeshPart.MeshId)
TextureId
string
This property sets the texture asset to be displayed on the MeshPart.
Code Samples
local MeshPart = script.Parent
print(MeshPart.TextureId)
MeshSize
Vector3
This property indicates the original size of the mesh.
Code Samples
local MeshPart = script.Parent
print(MeshPart.MeshSize)
EnableMeshShadowDetails
bool
Enables per-mesh shadow detail control. When true, the MeshShadowDetailLevel setting is applied to this MeshPart. Disable to use default engine shadow settings.
Code Samples
MeshShadowDetailLevel
Enum.ShadowDetailLevel
Sets the shadow detail level used when rendering this MeshPart.
Original: Use the original mesh shadow detail.
Medium: Reduce shadow detail for better performance.
Low: Lowest shadow detail for maximum performance.
Effective only when EnableMeshShadowDetails is true.
Code Samples
Methods
ApplyMesh
Currently not supported.
Parameters
Instance
InMeshPart
Return
void
Code Samples
Events
Last updated