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

How to make a part explode when clicked?

Asked by 5 years ago
Edited 5 years ago

Like when u click the part it explodes.

script.Parent.MouseClick:Connect(function() local explosionPart = script.Parent local explosion = Instance.new("Explosion",script.Parent) explosion.Position = explosionPart.position end) I saw two tutorials tried to combine the script.

1 answer

Log in to vote
1
Answered by 5 years ago

You forgot the ClickDetector.

Insert ClickDetector into a part and put this script in the part too.

 script.Parent.ClickDetector.MouseClick:Connect(function()
local explosionPart = script.Parent 
local explosion = Instance.new("Explosion",script.Parent) 
explosion.Position = explosionPart.position end)

Sorry if I sound passive agressive, I talk like that ¯_(?)_/¯

If this was helpful please, accept this question. I will really appreciate it.

0
Thanks , I made a mistake when putting the script lol it is not suppose to be in the part. RebornedSnoop 175 — 5y
0
Ok this works but how do you change the blast pressure/ radius youtubekingman100 0 — 4y
Ad

Answer this question