PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

Explosion

Show deprecated

Explosion

Show deprecated

An Explosion applies force to BaseParts within the explosion’s Explosion/BlastRadius. This force breaks joints between parts and kills Humanoid characters not protected by a ForceField.

If an explosion is instanced whilst the game is running, it will destroy itself shortly afterwards meaning they do not need to be cleaned up using the Debris service.

Explosion effects

Humanoids are killed by explosions as they break the character Model's neck joint. Parenting a ForceField to a model will protect all of its children from Explosions. This means that their joints will not be broken and thus Humanoids will not be killed.

If a developer doesn’t want joints between BaseParts to be broken or wants to implement their own formula for damaging Humanoids it is recommended they set Explosion/DestroyJointRadiusPercent to 0 and use the Explosion/Hit event to handle the result of the explosion.

Explosions can also be configured to damage Terrain, creating craters, this behavior is controlled by the Explosion/ExplosionType property.

The effect of an Explosion is not disrupted by obstacles, this means parts shielded behind other parts will still be effected, even if the BasePart they are shielded behind is not anchored.

Properties

float

BlastPressure

Used to determine the amount of force applied to BaseParts caught in the Explosion/BlastRadius.

float

BlastRadius

This property determines the radius of the Explosion, in studs. This radius determines the area of effect of the explosion, not the size of the explosion’s visuals.

float

DestroyJointRadiusPercent

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.

ExplosionType

ExplosionType

This property determines how the Explosion will interact with Terrain. Used to set if explosions will cause damage to the terrain or not.

Vector3

Position

This property is the position of the center of the Explosion. It is defined in world-space and not influenced by the Explosion's parent.

bool

Visible

This property determines whether or not the visual effect of an Explosion is shown or not.

Functions

Events

RBXScriptSignal

Hit ( Instance part , float distance )

Fires when the Explosion hits a BasePart within its Explosion/BlastRadius. Returns the part hit along with the distance of the part from Explosion/Position.