# llBreakLink

*LSL function*

```lsl
void llBreakLink(integer link);
```

- `integer link`: The link number (0: unlinked, 1: root prim, >1: child prims and seated avatars) to delink.

- Energy: 10
- Permission: `PERMISSION_CHANGE_LINKS`

Delinks the prim specified by the link number link. Requires the PERMISSION_CHANGE_LINKS runtime permission.

Delinks the [prim](https://wiki.secondlife.com/wiki/Primitive) with the given [link](https://wiki.secondlife.com/wiki/link) number in a [linked object set](/constants/LINK_SET/)

```lsl title="How to use" frame="terminal"
llBreakLink(0);
```

## Caveats

- This function removes sitting [avatars](https://wiki.secondlife.com/wiki/Avatar) from the [object](https://wiki.secondlife.com/wiki/Object), even if not sitting on the unlinked prim.
- This function silently fails if the link number refers to a seated avatar. Use [llUnSit](/functions/llUnSit/) instead
- This function silently fails if called from a [script](https://wiki.secondlife.com/wiki/Script) inside an [attachment](https://wiki.secondlife.com/wiki/Attachment).
- This function fails if the [owner](https://wiki.secondlife.com/wiki/Owner) does not have edit permissions on the object containing the script, the system message "*Delink failed because you do not have edit permission*" is received by the owner.
- A prim with [PERMISSION_CHANGE_LINKS](/constants/PERMISSION_CHANGE_LINKS/) can delink any prim in the linked object set even itself or the root
- The only [LINK\_\*](https://wiki.secondlife.com/wiki/Category:LSL_Link) flag that **link** currently supports is [LINK_ROOT](/constants/LINK_ROOT/). [SVC-3510](#svc-3510)
- Use [llGetLinkNumber](/functions/llGetLinkNumber/)() as the parameter to unlink the script's prim, not [LINK_THIS](/constants/LINK_THIS/).
- Use [llBreakAllLinks](/functions/llBreakAllLinks/)() instead of using [LINK_SET](/constants/LINK_SET/), [LINK_ALL_CHILDREN](/constants/LINK_ALL_CHILDREN/), or [LINK_ALL_OTHERS](/constants/LINK_ALL_OTHERS/) as the parameter for [llBreakLink](/functions/llBreakLink/).

## Examples

<details open>
<summary>Example 1</summary>

```lsl collapse={1-11}
//-- requests permission to change links, then breaks the link
//-- between the prim and the rest of the object, on touch.
default
{
    touch_start(integer vIntTouched)
    {
        llRequestPermissions(llGetOwner(), PERMISSION_CHANGE_LINKS);
    }

    run_time_permissions(integer perm)
    {
        if (perm & PERMISSION_CHANGE_LINKS)
        {
            llBreakLink(llGetLinkNumber());
        }
    }
}
```

</details>

## Known issues

From the issue templates included by the wiki article:

- SVC-3510 (bug): LINK\_\* flags do not work with llBreakLink

## See also

### Functions

- [llBreakAllLinks](/functions/llBreakAllLinks/) — Break all links
- [llCreateLink](/functions/llCreateLink/) — Link to another object

### Events

- [changed](/events/changed/) — [CHANGED_LINK](/constants/CHANGED_LINK/)

---

*Source: [LlBreakLink](https://wiki.secondlife.com/wiki/LlBreakLink) on the Second Life Wiki. Content from the Second Life Wiki articles LlBreakLink (revision 1219042, 2026-09-14), Template:Issues/SVC-3510 (revision 171343, 2008-12-10), Template:LSL Function/link (revision 1216622, 2024-05-04) and Template:LSL Function/permission (revision 1200093, 2016-05-12), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llBreakLink/
