Skip to content

Mesh

Inherits Entity

Represents a part that can have custom mesh applied to it, the mesh may be from the Polytoria Store (Hats, Tools and Heads) or user-uploaded meshes.

Properties

Asset : MeshAsset

The mesh asset used by this Mesh.

IncludeOffset : boolean

Whether to keep the offset of the mesh or recenter it.

CollisionType : CollisionTypeEnum

The type of collision shape to apply to the mesh.

PlayAnimationOnStart : boolean

Whether to play the mesh's animation automatically when the mesh is loaded.

UsePartColor : boolean

Whether to use the color of the part this mesh is attached to.

Color : Color

The color of the mesh.

CastShadows : boolean

Whether the mesh casts shadows.

CurrentAnimation : string

Indicates the name of the current animation playing on the mesh.

IsAnimationPlaying : boolean

Indicates whether an animation is currently playing on the mesh.

Methods

PlayAnimation → nil

Parameters

animationName [ string ]

speed [ number? ]

loop [ boolean? ]

Plays the specified animation on the mesh.

StopAnimation → nil

Parameters: animationName [ string? ]

Stops the specified animation on the mesh.

GetAnimations → table

Parameters: ``

Gets a list of all animations available on the mesh.