Is there a way to detect breakjoints()?

I’m trying to detect when a model house’s joints are broken by an explosion - so that I can remove or anchor the parts after the blast - that way loose parts laying/flying around the map are not lagging the game. Any suggestions for the least laggy way to do this?

You can use the function :GetJoints() to obtain a table of all the joints connected to a part.

You can use the Explosion.Hit event which fires when an explosion hits a Part. BreakJoints is fired when this event is called so this is probably what you’re looking for.

Thank you, I will definitely look into that!

So how would I detect when breakjoints() is firing within the explosion.hit event? Could you provide any script clips or pseudo-code?

1 Like