Skip to content

API: Attacher

ᴏᴠ ━ ᴀɴɪꜱᴀ edited this page Mar 4, 2025 · 10 revisions

» Overview

Assetify's attachment module serves as a robust framework for managing entity attachments, enabling users to seamlessly control and customize various elements on demand.

» Importing

Add the below code globally once in either of the shared .lua script of the resource you want to use within:

loadstring(exports.assetify_library:import("attacher"))()

» Modules

» APIs

  • assetify.attacher.setAttachment() - shared

    Attaches an element to a valid parent's bone.

    local bool: result = assetify.attacher.setAttachment(
       element: element,
       element: parent,
       float: offX, --Optional
       float: offY, --Optional
       float: offZ, --Optional
       float: rotX, --Optional
       float: rotY, --Optional
       float: rotZ --Optional
    )
  • assetify.attacher.setDetachment() - shared

    Detaches an element from attached parent.

    local bool: result = assetify.attacher.setDetachment(
       element: element
    )
  • assetify.attacher.clearAttachment() - shared

    Clears element's/parent's attachments.

    local bool: result = assetify.attacher.clearAttachment(
       element: element
    )