squarepart

Functions to get property information from parts. (MeshPart, Part, etc)

instance shape -> shape_type

Gets the shape of the part.

instance position -> vector3

Gets the position of the part.

instance set_position(vector3) -> void

Sets part position of the part.

instance cframe_position -> vector3

Gets the position of the part.

instance set_cframe_position(vector3) -> void

Sets the cframe position of the part.

instance cframe_angle -> vector3

Gets the cframe angle of the part.

instance set_cframe_angle(vector3) -> void

Sets the cframe angle of the part.

  • Cframe angle will use degrees so 1 to 360.

instance cframe_lookvector -> vector3

Gets the cframe lookvector of the part.

instance set_cframe_lookvector(vector3) -> void

Sets the cframe lookvector of the part.

instance cframe_rightvector -> vector3

Gets the cframe rightvector of the part.

instance cframe_upvector -> vector3

Gets the cframe upvector of the part.

instance velocity -> vector3

Gets the velocity of the part.

instance set_velocity(vector3) -> void

Sets part velocity of the part.

instance linear_velocity -> vector3

Gets the assemblylinearvelocity of the part.

instance set_linear_velocity(vector3) -> void

Sets part assemblylinearvelocity of the part.

instance size -> vector3

Gets the size of the part.

instance set_size(vector3) -> void

Sets the size of the part.

instance collision -> bool

Gets the position state of the part.

instance set_collision(bool) -> void

Sets the collision of the part.

instance transparency -> float

Gets the transparency of the part.

instance set_transparency(float) -> void

Sets the transparency of the part.

nstance reflectance-> float

Gets the reflectance of the part.

instance spectate() -> void

Sets your camera target to the instance.

instance color -> color

Gets the color of the part.

instance set_color(color) -> color

Sets the part color.

instance material -> material_type enum

Gets the material type of the part. Example (wood, plastic, forcefield, ...)

instance set_material(material_type) -> void

Sets the material of the part.

instance anchored -> bool

Returns if the object is anchored. Anchored determines whether the part will be immovable by physics.

instance set_anchored(bool) -> void

Sets the the anchored property.

instance get_primitive() -> instance

Gets the primitive pointer. stores position, size, etc. Use the memory to access or manipulate this data.

instance get_meshpart_id() -> string

Gets the mesh part id.

instance apply_chams(color, always_ontop, wireframe, wireframe_texture, glow, visible_textures, is_playerpart) -> void

Sets parts rendering settings.

  • Current color types (CHAMS_RED, CHAMS_GREEN, CHAMS_YELLOW, CHAMS_BLUE, CHAMS_PINK, CHAMS_CYAN, CHAMS_WHITE)

Name
Type
Description

color

int

Color type from CHAMS_...

always_ontop

bool

Renders through parts etc.

wireframe

bool

Self explanatory

wireframe_texture

bool

Self explanatory

glow

bool

Makes it glow

visible_textures

bool

Makes the part not see through

is_playerpart

bool

Needs to be true if the characters parent is the character.

instance reset_chams() -> void

Resets the part to its origin render settings.

Example

Last updated