# LINK_ROOT

*LSL constant*

```lsl
integer LINK_ROOT = 1;
```

Refers to the root prim of the linkset.

Constant groups: [Link](/constants/groups/Link/), [Links](/constants/groups/Links/)

Targets the root prim in the linkset.

## Caveats

- In a single prim object `LINK_ROOT` will not refer to the root prim!
- If your script needs to work in single and multiprim objects, instead of `LINK_ROOT`, use either `(llGetLinkNumber() != 0)` or `(!!llGetLinkNumber())`
- Alternatively, [LINK_THIS](/constants/LINK_THIS/) works in both single-prim and multiprim objects, assuming the script is inside the root prim and only needs to refer to itself.

## See also

### Constants

- [LINK_ALL_CHILDREN](/constants/LINK_ALL_CHILDREN/)
- [LINK_ALL_OTHERS](/constants/LINK_ALL_OTHERS/)
- [LINK_SET](/constants/LINK_SET/)
- [LINK_THIS](/constants/LINK_THIS/)

### Functions

- [llBreakLink](/functions/llBreakLink/)
- [llGetLinkKey](/functions/llGetLinkKey/)
- [llGetLinkName](/functions/llGetLinkName/)
- [llMessageLinked](/functions/llMessageLinked/)
- [llSetLinkAlpha](/functions/llSetLinkAlpha/)
- [llSetLinkColor](/functions/llSetLinkColor/)
- [llSetLinkPrimitiveParamsFast](/functions/llSetLinkPrimitiveParamsFast/)

### Events

- [link_message](/events/link_message/)

---

*Source: [LINK ROOT](https://wiki.secondlife.com/wiki/LINK_ROOT) on the Second Life Wiki. Content from the Second Life Wiki article LINK ROOT (revision 1215235, 2023-10-29), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/constants/LINK_ROOT/
