How would you make destruction physics with scripting?

  1. What do you want to achieve? Keep it simple and clear!
  • I want to achieve physics similar to the game destruction physics.
  1. What is the issue? Include screenshots / videos if possible!
    I would like to make destruction physics, But I don’t know how.

    How would I go about making something like this?
  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I did look for solutions on the DevForum, but I didn’t find any.

Would I use Unions, If so, How would I union blocks with a script?
How would I start, what would I begin with.
If you need some reference, here is the game with the physics I’m trying to achieve: Destruction Physics - Roblox

Thank you for reading this

3 Likes

If you make a part that has a hole type thing, position it at the hitPoint, then set it to union remove mode, then union the hitPart and the new part (or atleast when I saw it thats how I thought it works)

The way this game does that is by making new parts around where your hammer hits the wall, making them negative, and then unioning the wall and the new parts. I know this because the whole wall will disappear for a second then reappear when you hit it. (thats the union reloading)

To accomplish something like this, you would have to detect where the mallet hits. Then make negative parts through whatever it hits. You can make the edge look random like they did by arbitrarily spawning some more negative parts around the primary break. Then, union all these parts with your wall.

That is the basic concept behind how this works, the rest is up to you to figure out.

12 Likes

Thank you for this, I’m also looking to accomplish something similar. However, is there a way for the destruction area to leave behind fragments that are unanchored?

I was thinking of trying to use the newer intersect feature of unions, but I’m not sure how I would structure that as a script.