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

Click to explode named brick?

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)

1 comment

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?"

1 answer

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