Prop.isDestroyed ▲ 12

Available from Easy Red 2 2.1.1

Whether every part is at its last phase.


Return value

Return TypeDescription
boolTrue when the prop is destroyed. False for a prop that cannot be broken.

No parameters defined for this function.


Examples

The first hit brings the whole prop down

-- on a destructible building: as soon as a part breaks, every part goes
myself:onDestroyed(function(part)
    if not myself:isDestroyed() then
        myself:destroy()
    end
end)

Back to Scripting API