I want to use a trigger brick to cause an explosion in another brick. Thanks
COMMUNITY QUESTION
How would I use a brick as a trigger for another brick?
1 answer
Are you wanting to be able to click a brick and have another one explode?
If you just want to touch one brick to explode the other you can do the following:
First add in your two bricks and name them differently. For this example I label one "Touch", and another "Explode." Once you have the bricks in your workspace place a script into the Touch brick. In the script write the following:
function onTouched()--Function here
local Exploding = game.Workspace.Explode--Sets Value
local boom = Instance.new("Explosion")
boom.Parent = Exploding
boom.Position = Exploding.Position--Sets the explosion to the position of our brick
boom.BlastPressure = 5e+005--Sets Parameter
boom.BlastRadius = 15--Another Parameter
boom.Name = "Explosion"--Names the Explosion
end
script.Parent.Touched:connect(onTouched)--Runs the script when the brick is touched
Let me know if you have any other trouble. Hope this helps.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
just touch it
Thanks