Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to make it so parts will not be affected by an explosion?

Asked by 5 years ago
Edited 5 years ago

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.

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.Position = script.Parent.Position
ex.Parent = game.Workspace
script.Parent.End.Disabled = false
script.Disabled = true
end
script.Parent.Touched:Connect(Explode)

1 answer

Log in to vote
1
Answered by 5 years ago

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)

Ad

Answer this question