I made a landmine script, but the thing I don’t want from the explosion is affecting things other than players, such as bricks. I actually have no clue how to detect which object will be blasted off and which ones won’t be affected. Does anyone know what may help? Here’s the script.
01 | button = script.Parent |
02 | bottom = script.Parent.Parent.Bottom |
03 | explosionSound = script.Parent.ExplosionSound |
04 | beep = script.Parent.Beep |
05 | function Explode() |
06 | beep:Play() |
07 | wait(. 6 ) |
08 | explosionSound:Play() |
09 | ex = Instance.new( "Explosion" ) |
10 | ex.BlastPressure = 300000 |
11 | ex.BlastRadius = 10 |
12 | ex.Position = script.Parent.Position |
13 | ex.Parent = game.Workspace |
14 | script.Parent.End.Disabled = false |
15 | script.Disabled = true |
16 | end |
17 | script.Parent.Touched:Connect(Explode) |
DestroyJointRadiusPercent is the amount of damage to bricks near it after the explosion. It will destroy joints far as depending on the range.
button = script.Parent
bottom = script.Parent.Parent.Bottom
explosionSound = script.Parent.ExplosionSound
beep = script.Parent.Beep
function Explode()
beep:Play()
wait(.6)
explosionSound:Play()
ex = Instance.new(“Explosion”)
ex.BlastPressure = 300000
ex.BlastRadius = 10
ex.DestroyJointRadiusPercent = 0
ex.Position = script.Parent.Position
ex.Parent = game.Workspace
script.Parent.End.Disabled = false
script.Disabled = true
end
script.Parent.Touched:Connect(Explode)