> For the complete documentation index, see [llms.txt](https://fehdead.gitbook.io/npc-kit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/attachinfo.md).

# npc.attachinfo

```lua
npc.attachinfo(mode, data)
```

|                         |                                 |
| ----------------------- | ------------------------------- |
| id                      | `0x01C8`                        |
| arguments               | 2: Int, Int                     |
| in NPC Kit              | yes                             |
| measured from a kit NPC | returns                         |
| vanilla scripts         | 197 calls in 37 of 1114 scripts |

## What it does

Gives the next [attach](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/attach.md) an offset, angles or scales, read from the script's own data by reference.

## Arguments

### `mode` (Int)

`0` the offset, `1` the angles, `2` the scales.

### `data` (Int)

A reference to three floats in the script's data (`&var[0]` in an EBP).

## Timing

Returns at once.

## In NPC Kit

**Not usable**: its second argument is a reference into the script's data, which a recorded script has none of. A kit prop attaches with no offset: a weapon model's origin is its grip, which sits it in the hand as it is.

## Used with

* [attach](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/attach.md).

## Example

Not usable in the kit. A prop attaches with no offset; pick a model whose origin is where it should be held (a weapon model's origin is its grip):

```lua
npc.on("npckit_0031").attach(npc.actor("npckit_0030"), 2);   -- no attachinfo before it
```
