Breaking Walls Effect

so i’m trying to make it where a certain punch can break through certain walls; so that players can have fun breaking into houses and stuff (lol) and i’m not so sure how to do it… i don’t want to make each fragment via building; i rather do it in a scripting way… so how could i make it where when someone punches, if they hit a certain type of wall- the wall will break apart? (or like a section will break apart)

1 Like

This is a really hard subject to talk about especially since you want it on every house, Roblox has something to do with unions or something and I’m guessing that you can seperate unions as well using scripts so you could union tons of bricks together and then seperate them when punched

well i could just do it on 1 part right now for testing purpouses; however eventually there will be maps and i don’t think messing with unions all the time is very smart… also i got no idea what you were trying to say, were you trying to say use negating in scripts?..

You can just pre-make “fragment shapes”. Then if a player breaks a certain thing that is tagged “Breakable”/any name you choose (you can use collection service), then just :Destroy() the wall, and summon fragment parts in the same position along the part.

Math.random() the fragments of course.

2 Likes

I created a module specifically for this a little while back. It uses math to split a part into many triangles, based off of a “center fracture point”, which can be passed to the BreakSurface() function.

Hope this helps!

2 Likes

It breaks apart more like glass or window (since of course it was probably meant for that). And it does so in triangluation?

The op wants to make it for wall breaking I’m assuming. It would more easier if just as I said before. Creation of fragments beforehand, then colorize/materialize to fit wall asthetic, then summon random fragments across wall to make crumble/breaking effect of walls.

However, very neat module, :ok_hand:

1 Like

In terms of matching the original objects texture, he could easily customize it so that the triangles would take on the texture of the wall.

However, you might be right if the wall is pretty big. I made this module to break an entire surface, not just a segment of one. So if you wanted to just smash part of a wall, you could run into problems.