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

How to detect if part was affected by explosion?

Asked by 1 year ago

i made a bomb that explodes when player touches it now what i want is when the bomb explodes near other bombs the other bombs will explode too

is there any quick and easy way to do this?

1 answer

Log in to vote
0
Answered by
Dfzoz 489 Moderation Voter
1 year ago
Edited 1 year ago

Explosion.Hit lets you get the parts hit by the bomb and apply a code on them

Explosion.Hit:Connect(function(part) if part.Name == "Bomb" then --explosion function on the part end end)

You might want to add an "exploded" value so bombs dont explode more than once.

Ad

Answer this question