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

Click to explode named brick?

Asked by 9 years ago

Hello, in the following script how can I convert it to just explode the named brick? I tried changing the name of the part and the following script, yet it seems to explode randomly some where else?

function onClicked()
   local deer = Instance.new("Explosion") -- IT DOES NOT HAVE TO BE "E" IT CAN BE ANY LETTER. I JUST LIKE USING THIS

    deer.BlastRadius = 10 --THE RADIUS, THE BIGGER THE RADIUS, THE BIGGER IT IS

    deer.BlastPressure = 99999 -- THE BLAST PRESSURE IS HOW POWERFUL IT IS. THE HIGHER, THE MORE DEADLY AND THE MORE UNANCHORED BRICKS WILL GO FLYING

    deer.Parent = game.Workspace

    deer.Position = script.Parent.Parent.door.Position
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
0
Strange. I see no errors. Be sure that "door" is in the correct location, but besides that, there could be nothing wrong with your script. Do you want the explosion to be positioned at "door?" Or "script.Parent?" Redbullusa 1580 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

At the door itself, my bad.

Ad

Answer this question