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

Position

Explosion

Vector3

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.

BaseParts will be influenced by the Explosion if they are within Explosion/BlastRadius studs of the explosion’s position.

The effect of an explosion is instantaneous. This means that although the position of an explosion can be changed after it has been set it cannot affect two different areas. Once an explosion has been ‘detonated’, shortly after parenting it to a descendant of the Workspace, it will not do so again. In some cases the visual effect of the explosion will move but it will have no effect.

For this reason a new Explosion should be created if the developer wants an explosion to appear at a different position.


Code Samples


Explosion Instantiation

This code sample includes a brief snippet that creates a large explosion in the game at 0, 10, 0.

local explosion = Instance.new("Explosion")
explosion.BlastRadius = 60
explosion.ExplosionType = Enum.ExplosionType.Craters -- damages terrain
explosion.Position = Vector3.new(0, 10, 0)
explosion.Parent = game.Workspace