Used to set the proportion of the
Explosion/BlastRadius, between 0 and 1, within which all joints will be destroyed. Anything outside of this range will only have the
Explosion force applied to it.
For example, if
Explosion/BlastRadius is set to 100 and DestroyJointRadiusPercent is set to 0.5, any joints within a radius of 50 studs would be broken. Any joints between the ranges of 50 and 100 studs wouldn’t be destroyed, but the
Explosion's force would still be applied to the
This property allows developers to make
Explosions ‘non-lethal’ to
Humanoids by setting DestroyJointRadiusPercent to 0. This means the neck joint will not be broken when characters come into contact with the
This sample contains a simple function that creates a custom explosion. The custom explosion will not break joints as Explosion.DestroyJointRadiusPercent is equal to 0. This means Humanoids will not be instantly killed as their neck joints are broken. In this example explosion.BlastPressure is equal to zero so as not to apply force or damage terrain but this can be changed.
The Explosion.Hit event is used to listen for contact. Once contact has been made the code will look for the parent model of the BasePart hit by the explosion. If that model exists, hasn’t already been damaged and has a Humanoid in it damage will be applied based on distance from the explosion’s origin.
Non lethal explosions
This sample includes an example of how Explosions can be made non lethal to player characters.