# stopObject (Shared)

> Stops an object's movement wherever it is.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Objects
- **URL**: https://wiki.mymp.gg/en/stopObject

## Syntax

```lua
bool stopObject(element object)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `object` | `element` | The object. It may also be a parent element: every object below it stops. |

## Returns

`true` if the element given is an object.

## Example

```lua
addCommandHandler("stopgate", function()
    stopObject(gate)
end)
```

## See also

- [moveObject (Shared)](https://wiki.mymp.gg/en/moveObject.md): Moves an object smoothly to a position, turning it along the way.
- [onClientObjectMoveStop (Client)](https://wiki.mymp.gg/en/onClientObjectMoveStop.md): Fired on this client when an object's movement ends: it arrived, stopObject stopped it or a new moveObject took over.
