# llStopMoveToTarget

*LSL function*

```lsl
void llStopMoveToTarget();
```

- Energy: 10

Stops the critically damped movement of the object toward a target (canceling llMoveToTarget). Use llStopLookAt to stop rotational tracking.

Stops critically damped motion

Use in conjunction with [llMoveToTarget](/functions/llMoveToTarget/)

To stop rotation movement use [llStopLookAt](/functions/llStopLookAt/)

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

## Examples

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

```lsl collapse={1-10, 16-36}
integer gLockPrimInPlace;

default
{

    on_rez(integer sp)
    {
        llResetScript();
    }

    state_entry()
    {
        llStopMoveToTarget();
        llSetStatus(STATUS_PHYSICS, TRUE);
    }

    touch_start(integer total_number)
    {

        if (llDetectedKey(0) != llGetOwner())
        {
            return;
        }

        if (!llGetStatus(STATUS_PHYSICS))
        {
            llOwnerSay("Locking or unlocking position works only for physical objects.");
            return;
        }

        gLockPrimInPlace = !gLockPrimInPlace;
        if (gLockPrimInPlace)
        {
            llMoveToTarget(llGetPos(), 0.05);
            llOwnerSay("Locked in place.");
        }
        else
        {
            llStopMoveToTarget();
            llOwnerSay("Unlocked.");
        }

    }

}
```

</details>

---

*Source: [LlStopMoveToTarget](https://wiki.secondlife.com/wiki/LlStopMoveToTarget) on the Second Life Wiki. Content from the Second Life Wiki article LlStopMoveToTarget (revision 1209960, 2021-04-11), CC BY-SA 3.0.*

---

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