How to not let unanchored parts fall

Howdy!,
I am not sure what category this question belongs to but I need help with this lego type of wall to stand up without falling. It’s a wall made up of a bunch of unanchored parts that will collapse when a player collapses it with who will be charged by a cannon. I tried changing the density, friction, elasticity, frictionWeight, and elasticityWeight but couldn’t solve it. Prob I didn’t put helpful values and I am open suggestions for these values. I also tried making them massless but that didn’t help as well.

Here is a video if you are confused.

Thanks!

1 Like

Anchor it, but if you don’t want to anchor it, welding it will do.

I want it to fall apart when a player crashes into it. Welding would just make it like a one-piece. I want to have a realistic effect of a player crashing into it not just falling apart if that makes sense. I know I can just add a touch event and make all the parts unanchored but that would be unrealistic and there would be no crash impact.

1 Like

One thing I thought of, is that you could Anchor all of those Parts (Bare with me here), put all the Parts into a folder, then loop through that said “Folder” by getting all of the Children inside it, and detect if a Player will come into contact with 1 of the Parts or not and if they do set those Parts that got touched to be Unanchored:

local PartFolder = workspace:WaitForChild("PartFolder")

for _, Part in pairs(PartFolder:GetChildren()) do
    local Connection
    local function Touched(Hit)
        local Plr = game.Players:GetPlayerFromCharacter(Hit.Parent)

        if Plr then
            Connection:Disconnect()
            Part.Anchored = false
        end
    end
   
    Connection = Part.Touched:Connect(Touched)
end

Not sure if this is what you entirely want though, the other option would just be to add some sort of Force keeping it up and then removing that Force once the Part gets touched

1 Like

You can weld the parts together. Ofc, doing this manually would take a long time.

I recommend u check out this auto weld script i made:

(Use the 2nd script here)
Make sure to make all the parts a model and change the plane variable value with the model’s path. Feel free to ask any questions :slight_smile:
The script will weld all the model’s parts with whatever it’s touching. Resulting in the parts not falling while still being unanchored
@Jackscarlett

1 Like

Why do the Parts all look like they rotate along the wall’s axis? If you watch the video they appear to be 4 x 2 x 1 stud Parts all stacked with their shortest side aligned with the Y axis, but as soon as you hit Play they look like they are standing on their 2 stud edge.
The wall appears thicker than the grey wall behind it, but becomes thinner than the grey wall suddenly, and collapses. Do you have some sort of CFraming script that might be doing that to the Parts?
If not then have you added any plugins or free models?
Try placing 3 of the wall Parts on the ground, one on its 1 stud side, one on its 2 stud side, and 1 on its 4 stud side, then hit Play.
If you have a bunch of fairly flat Parts stacked on each other I wouldn’t expect them to collapse that suddenly and vertically. I would expect it to maybe start to crumble at the bottom, then lean one way or the other, then collapse.

Thank you guys for the quick responses!
I’ve found a solution myself which was to put it in a brick wall type of style. Stacking them in a straight line will make them fall. Also changed the density of each brick to 0 which made them lighter and easy to knock off.

Brickwall
image

But why did the wall suddenly appear skinnier in your video?

I had a script that made the wall skinnier for testing purposes to see what size works the best. I forgot to mention that in the post.