Prop.setDestructionPhase ▲ 8

Available from Easy Red 2 2.1.1

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 TypeDescription
voidThis function doesn't return anything

Parameters

ParameterTypeDescription
1NumberThe part, 1 for the first.
2Number0 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)

Back to Scripting API