Skip to content

Bone Attachment

Under a Skeleton: follows one of its bones - put a weapon, a light or particles under it.

Type: BoneAttachmentNode · Category: Animation & Effects · Also found as: bone attachment, attach to bone

Property Type Default Description
bone string "" The parent skeleton’s bone this node follows (its children ride along: a weapon in the hand).
followRotation boolean true Turn with the bone.
followScale boolean false Scale with the bone.

Plus the common properties every node has.

Call them on the node (self.node in its script, or self.node:get_node("path")). Every node also has the Node methods.

Reads an Inspector property by its path (vectors and colours as tables); “script.” reads a field of the node’s script.

local value = self.node:get_property("bone")
  • path BoneAttachmentNodeProperty|string

Returns any

BoneAttachmentNode:set_property(path, value, y)

Section titled “BoneAttachmentNode:set_property(path, value, y)”

Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.” a field of the node’s script.

self.node:set_property("bone", "text")
  • path BoneAttachmentNodeProperty|string
  • value any
  • y? number
{
"type": "BoneAttachmentNode",
"name": "BoneAttachment",
"position": [
0,
0
],
"properties": {
"bone": "",
"followRotation": true,
"followScale": false
}
}