# breakObject (Shared)

> Breaks a breakable object at once.

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

## Syntax

```lua
bool breakObject(object object)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `object` | `object` | The object. |

## Returns

`true` if the object broke. `false` if it cannot be broken or, on a client, it is not loaded or its model does not break.

On the server, the break reaches every client.

## Example

```lua
addCommandHandler("smash", function()
    breakObject(window)
end)
```

## See also

- [setObjectBreakable (Shared)](https://wiki.mymp.gg/en/setObjectBreakable.md): Sets whether a breakable object can be broken. An object that cannot is immune to any damage.
