setObjectBreakable
Shared
Sets whether a breakable object can be broken. An object that cannot is immune to any damage.
bool setObjectBreakable(object object, bool breakable)
Parameters
| Name | Type | Description |
|---|---|---|
| object | object | The object. |
| breakable | bool | true so it can break, false so it cannot. |
Returns
true once the value is set.
It only matters for models that break, such as glass and objects with collision damage. On the server, the value reaches every client.
Example
local window = createObject("lae_smashablewindow", 1420.0, -1600.0, 14.0)
setObjectBreakable(window, false)