Reference API Roblox

Engine API

Website

Related

Reference API Roblox

SpecialMesh

The SpecialMesh object applies a mesh to a BasePart depending on the MeshType property.

Member index 1

HistoryMember
553MeshType: MeshType
inherited from FileMesh
486MeshId: Content
486TextureId: Content
inherited from DataModelMesh
553Offset: Vector3
553Scale: Vector3
553VertexColor: Vector3
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553ClassName: string
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
553className: string
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
486GetChildren(): Objects
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
462GetPropertyChangedSignal(property: string): RBXScriptSignal
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsA(className: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
553children(): Objects
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
553getChildren(): Objects
462isA(className: string): bool
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462Changed(property: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)

Description

The SpecialMesh object applies a mesh to a BasePart depending on the MeshType property. A number of options are available.

  • Brick - A block shape, equivalent to a BlockMesh
  • Cylinder - A cylinder, identical to a Part with a Part.Shape of 'Cylinder'
  • FileMesh - A user uploaded Mesh, equivalent to FileMesh that a texture can be applied to using the FileMesh.TextureId property
  • Head - A character head shape
  • Sphere - A sphere shape, similar to a Part with a Part.Shape of 'Ball' but can be freely resized on all axis
  • Wedge - A wedge shape, identical to a WedgePart
  • Torso - A block with sloped sides, due to be deprecated

Note, each SpecialMesh.MeshType will scale differently when using DataModelMesh.Scale, for more information on this please see the page on DataModelMesh.Scale. The SpecialMesh object also exposes the DataModelMesh.Offset property.

It is important to remember that when using a SpecialMesh, only the appearance of a part changes. The collision model of the part remains the same. For example, a character will not be able to walk correctly over a mesh as the mesh geometry is not taken into account.

SpecialMesh vs MeshPart

There are currently two ways of using a developer created mesh. They are using a SpecialMesh with the SpecialMesh.FileType set to 'FileMesh', or by using a MeshPart. Although, on the whole, the MeshPart object has superseded the SpecialMesh there are some differences developers should be aware of.

History 8

Members 1

MeshType

TypeDefault
MeshTypeHead

The mesh that the SpecialMeshobject applies to the BasePart depends on the MeshType property. A number of options are available.

  • Brick - A block shape, equivalent to a BlockMesh
  • Cylinder - A cylinder, identical to a Part with a Part.Shape of 'Cylinder'
  • FileMesh - A user uploaded Mesh, equivalent to FileMesh that a texture can be applied to using the FileMesh.TextureId property
  • Head - A character head shape
  • Sphere - A sphere shape, similar to a Part with a Part.Shape of 'Ball' but can be freely resized on all axis
  • Wedge - A wedge shape, identical to a WedgePart
  • Torso - A block with sloped sides, due to be deprecated

Note, each MeshType will scale differently when using DataModelMesh.Scale, for more information on this please see the page on DataModelMesh.Scale.

History 4

Settings