This class inherits ActiveInstance which means that all properties, functions and signals from ActiveInstance can be used.

Cuberns MeshPart only support .glb. If you manage to import a .gltf: it won’t work in playtest or exported build.

Properties

let_engine_make_collisions: bool

Specifies if the engine should make collisions of mesh by itself. It has a significant impact on performance. This should only be used for structures which do not follow a single shape.

mesh_id: int

Specifies mesh_id. The value cannot be changed if any existing mesh is being loaded.

play_anim_on_start: string

The string value named animation will be played on start.

currently_running: string

Returns name of animation currently running only if any else returns empty string.

Functions

Play(string animationName)

This function will play animation (if any found by name of animationName parameter). An example:

local meshPart = Map.AnimatedCube
meshPart:Play("Bounce");

PlayBackwards(string animationName)

This function will play animation backwards (if any found by name of animationName parameter). An example:

local meshPart = Map.AnimatedCube
meshPart:PlayBackwards("Bounce");

StopAnimation()

The function will stop a playing animation. An example:

local meshPart = Map.AnimatedCube
meshPart:PlayBackwards("Bounce");
wait(0.2)
meshPart:StopAnimation()

GetAnimations()

This function will return a list of name of animations inside the mesh. If none then returns nil. An example:

local meshPart = Map.AnimatedCube
local listOfAnims = meshPart:GetAnimations()