Skip to main content

MeshPart

Inherits from Part

MeshPart is 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.


Summary

Properties

Methods


Properties

Anchored

MeshPart.Anchored: bool

Specifies whether the part is to be affected by physics or not.


AngularVelocity

MeshPart.AngularVelocity: Vector3 = Vector3.New

Parameters:

ParameterTypeDefaultDescription
0any-
0any-
0any-

Specifies the angular velocity of a part.


AssetID

MeshPart.AssetID: int

The asset ID of the mesh part.


CanCollide

MeshPart.CanCollide: bool

Specifies whether the part can be collided with or not.


Mass

MeshPart.Mass: float

Specifies the mass of a part in kilograms.


Material

MeshPart.Material: PartMaterial

Specifies the material of the part.


Shape

MeshPart.Shape: PartShape

Specifies the shape of a part.


Velocity

MeshPart.Velocity: Vector3 = Vector3.New

Parameters:

ParameterTypeDefaultDescription
0any-
100any-
0any-

Specifies the velocity of a part.


CurrentAnimation

MeshPart.CurrentAnimation: string

The current animation of the mesh part.


IsAnimationPlaying

MeshPart.IsAnimationPlaying: bool

Returns whether or not the animation is playing.


PlayAnimationOnStart

MeshPart.PlayAnimationOnStart: bool

Specifies whether or not to play the animation on start.


CollisionType

MeshPart.CollisionType: CollisionType

Specifies the collision type of the part.


Methods

MovePosition

MeshPart:MovePosition(position: Vector3)

Parameters:

ParameterTypeDefaultDescription
positionVector3-

Moves the MeshPart to the specified position.


MoveRotation

MeshPart:MoveRotation(rotation: Vector3)

Parameters:

ParameterTypeDefaultDescription
rotationVector3-

Rotates the MeshPart to the specified rotation.


PlayAnimation

MeshPart:PlayAnimation(animationName: string, objectPath: string, speed: float, loop: bool)

Parameters:

ParameterTypeDefaultDescription
animationNamestring-
objectPathstringnil
speedfloat1
loopboolfalse

Plays the animation with the specified name, if it exists.


StopAnimation

MeshPart:StopAnimation(name: string)

Parameters:

ParameterTypeDefaultDescription
namestringnil

Stops playing the current animation.


GetAnimations

MeshPart:GetAnimations()

Returns the names of the animations associated with the mesh.


GetAnimationSources:string

MeshPart:GetAnimationSources:string[]()

GetAnimationInfo:AnimationInfo

MeshPart:GetAnimationInfo:AnimationInfo[]()

Properties