Reference API Roblox

Engine API

Website

Related

Reference API Roblox

FileMesh

The FileMesh object applies a mesh to a BasePart when parented to it. Its properties are inherited by the SpecialMesh object.

Member index 2

HistoryMember
645MeshId: ContentId
645TextureId: ContentId
inherited from DataModelMesh
553Offset: Vector3
553Scale: Vector3
553VertexColor: Vector3
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
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
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: 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
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

The FileMesh object applies a textured mesh to a BasePart when parented to it. Its properties are inherited by the SpecialMesh object.

What is a FileMesh?

FileMeshes allow user uploaded meshes to be applied to a BasePart. The mesh that is applied is dependent on the FileMesh.MeshId property. A texture can also be applied to this mesh using FileMesh.TextureId.

Although it is not an abstract class, and can be used by developers, all FileMesh properties are inherited by the SpecialMesh object. A SpecialMesh behaves identically to the FileMesh object when its SpecialMesh.MeshType is set to 'FileMesh'. Although both objects are functional, the SpecialMesh object is the official supported class.

For more information on using meshes, please see the SpecialMesh page.

History 12

Members 2

MeshId

TypeDefault
ContentId

The MeshId is the content ID of the mesh that is to be displayed.

The content ID for a mesh is generated when a developer uploads a mesh to the Roblox website.

How do I create a mesh?

Meshes can currently only uploaded using MeshParts or the asset manager. Once uploaded however, the content ID for the mesh can be used for the MeshId property. For more information, see Meshes.

History 4

TextureId

TypeDefault
ContentId

The TextureId is the content ID of the image that is to be applied to used for the meshes texture. When the TextureId property is set to an empty string, no texture will be applied to the mesh.

How can I change the texture of a mesh?

Using the TextureId property, the texture of a mesh can be changed without having to reupload the mesh. To do this, a new image will need to be uploaded to Roblox with the desired texture. The original texture image file can be obtained by exporting the mesh using the 'Export Selection' option in Roblox Studio. The image file will be saved alongside the exported .obj file.

The new texture can then be re-uploaded to Roblox as a Decal and its content ID can be applied to the mesh using the TextureId property.

How can I make a textured mesh?

A mesh can only be textured if the mesh has been UV mapped. UV mapping refers to the practice of projecting a texture map onto a mesh. This cannot be done using Roblox Studio and has to be done using an external 3D modelling application such as Blender.

History 4

Settings