Explosion

Explosions are Roblox objects that simulate the effect of an explosion. When exploding, they push parts away and create craters in the nearby terrain. Explosions will also break the joints of nearby parts.

Explosions will only be displayed and have an effect if they are located in the workspace. They will disappear immediately after exploding. The following code will create an explosion, put it in the workspace and create a reference to it in the variable explosion :

Explosions have a property called 'Position', like parts. That property can be used to set the position where they will explode. Note that putting an explosion in a part or in a model will not make it explode close to that model or part unless you set its position accordingly. In this case, let's put it at the position $\begin{bmatrix} 1 & 2 & 3 \end{bmatrix}^{\mathsf{T}}$ :

Explosions also have two other properties: BlastRadius and BlastPressure. The first defines the radius of the explosion and the second defines its pressure. The radius is the distance the explosion will cover, while the pressure is how strongly it will push parts away.

The default pressure is 500000. That is enough to create an average explosion (imagine the explosion produced by the classic rocket launcher). If explosions have very low pressure, they will not push parts and break joints. This can be used to get the visual effect without affecting the game. Let's say we don't want a very powerful explosion, so we'll set the pressure to 5000 and the radius to 8 (which is the double of the default radius of 4):

A third property, the ExplosionType property, can be used to set the type of the explosion. The type of explosion can be used to make it behave differently with the terrain. Let's pretend we want an explosion that pushes parts away and breaks joints, but doesn't destroy the terrain:

Explosions also have an event called the Hit event. It fires when the explosion hits a part and gives, as arguments, the part and the distance from it and the center of the explosion (before it was pushed away, that is). With this event, you could, for example, make parts disappear when they are hit by an explosion or add a Fire object in them to make them look like they're burning.

Appearance
2006-Mid 2007: Explosions looked like a red ball. If a Robloxian touches it, they instantly get killed. If a brick is in the range, it flies apart without decreasing explosion pressure. This function would be used from 2006 onwards.

2007–2009: Explosions were changed to a particle-based animation as part of Roblox's major graphics rehaul.

2009–2012: Explosions were changed again. They featured a new particle animation that resembled a real explosion.

2012–2014: Explosions featured a darker color scheme and had a shorter lifespan.

Early 2014–Late 2014: A bug in which explosions in the client were constantly vanishing in a second when Roblox's own engine was implemented.

2014–2015: Explosions are now much more realistic and brighter, and a shockwave emits from it.

2015-present: Explosions are slightly brighter, they create a white light as it occurs, and they sent small lava bombs (that will kill you if you are near the explosion).