nanos world API Reference Unofficial documentation
Function Network authority Moderate

Actor:AttachTo

Attaches this Actor to any other Actor, optionally at a specific bone

Syntax

Lua
my_actor:AttachTo(other, attachment_rule = SnapToTarget, bone_name = "", lifespan_when_detached = -1, use_absolute_rotation = false)

Parameters

Name Type Default Description
other Actor Other actor to attach
attachment_rule optional AttachmentRule SnapToTarget How to attach
bone_name optional string "" Which bone to attach to. If empty it will be attached to the Actor, otherwise to the Mesh at the bone/socket
lifespan_when_detached optional float -1 Seconds before destroying this Actor when detached, setting it to 0 will automatically destroy this actor when detached, setting it to 10 will destroy this after 10 seconds when detached
use_absolute_rotation optional boolean false Whether to force attached object to use absolute rotation (will not follow parent)

Returns

  • boolean attached_successfully if it was attached successfully