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?

01function onClicked()
02   local deer = Instance.new("Explosion") -- IT DOES NOT HAVE TO BE "E" IT CAN BE ANY LETTER. I JUST LIKE USING THIS
03 
04    deer.BlastRadius = 10 --THE RADIUS, THE BIGGER THE RADIUS, THE BIGGER IT IS
05 
06    deer.BlastPressure = 99999 -- THE BLAST PRESSURE IS HOW POWERFUL IT IS. THE HIGHER, THE MORE DEADLY AND THE MORE UNANCHORED BRICKS WILL GO FLYING
07 
08    deer.Parent = game.Workspace
09 
10    deer.Position = script.Parent.Parent.door.Position
11end
12 
13script.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