Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you make a brick disappear with an explosion?

Is this possible at all, if not can an explosion make certain bricks (not all that are around it) turn collisions off making it fall through a baseplate? Thanks!

1 comment

0

Yes, it is possible.

2 answers

I fixed it, It should work... You need the bricks to be anchored, and not welded to any other parts. and put this script in a part. It can only work once so yea...

function OnTouch(hit)

local brick = game.workspace:FindFirstChild("Brick1")
local brick2 = game.workspace:FindFirstChild("Brick2")
local brick3 = game.workspace:FindFirstChild("Brick3")
local brick4 = game.workspace:FindFirstChild("Brick4")
local human = hit.Parent:FindFirstChild("Humanoid") -- returns "Humanoid" if exists, else returns nil
if human ~= nil then     -- if the toucher is human, then
local boom = Instance.new ("Explosion", game.workspace.Brick1)
boom.Position = brick.Position
boom.BlastPressure = 10
boom.BlastRadius = 1
brick.Anchored = false
brick.CanCollide = false
brick.Transparency = 1
brick2.Anchored = false
brick2.CanCollide = false
brick2.Transparency = 1
brick3.Anchored = false
brick3.CanCollide = false
brick3.Transparency = 1
brick4.Anchored = false
brick4.CanCollide = false
brick4.Transparency = 1
wait(1)
end
end
script.Parent.Touched:connect(OnTouch)

Didn't work. Thank you for the response though! :)

This discussion is preserved as it was. New answers, comments, and votes are closed.