# llGetForce

*LSL function*

```lsl
vector vector llGetForce();
```

- Returns: `vector`
- Energy: 10

Returns a vector representing the constant force currently applied to the object (if the object is physical).

Returns a [vector](https://wiki.secondlife.com/wiki/vector) that is the force (if the script is physical)

```lsl title="How to use" frame="terminal"
vector result = llGetForce();
```

## Examples

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

```lsl collapse={1-7}
default
{
    state_entry()
    {
        llSetForce(<0,llFrand(10),0>,FALSE); //Sets the force in a frand of 10 in Y axis.
        llSetTimerEvent(1); //Resets the force every second.
    }
    touch_start(integer total_num)
    {
        llOwnerSay((string)llGetForce()); //Says the force.
    }
    timer()
    {
        llResetScript();
    }
}
```

</details>

## See also

### Functions

- [llGetOmega](/functions/llGetOmega/)
- [llGetVel](/functions/llGetVel/)
- [llGetTorque](/functions/llGetTorque/)
- [llGetMass](/functions/llGetMass/)
- [llGetAccel](/functions/llGetAccel/)
- [llSetForce](/functions/llSetForce/)
- [llSetTorque](/functions/llSetTorque/)
- [llSetForceAndTorque](/functions/llSetForceAndTorque/)

---

*Source: [LlGetForce](https://wiki.secondlife.com/wiki/LlGetForce) on the Second Life Wiki. Content from the Second Life Wiki article LlGetForce (revision 1194173, 2015-01-22), CC BY-SA 3.0.*

---

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