Prop.setDestructionPhase 8
Sets the destruction phase of a part, clamped to the ones it has. Applied to the instance when there is one, kept for the next one otherwise. Every client runs the prop scripts, so no network sync is needed.
Return value
| Return Type | Description |
|---|---|
| void | This function doesn't return anything |
Parameters
| Parameter | Type | Description |
|---|---|---|
| 1 | Number | The part, 1 for the first. |
| 2 | Number | 0 intact, up to the last phase of the part. |
Examples
A wall that starts cracked and cannot be broken further
-- on a destructible prop: the first part starts at phase 1, then nothing can damage it
myself:setDestructionPhase(1, 1)
myself:setIndestructible(true)