Making a script that will make all fallen parts disappear after 5 seconds

Are these messages not asking the same thing?

The 2 first are ther same, This one is not, Making the part disappear by the touch of the explosion is impossible, So I’m searching for another way, Maybe with joints

Who told you it was impossible? What’s wrong with the explosion hit event?

Shouldn’t they all fall since they are welded ? I think you can use the .part0 and .part1 properties of WeldConstraints to do that. Nothing is impossible.

Pretty sure explosions destroy joint and weld objects

Try logging all part positions at startup, and then polling to see if it’s been changed. If so, wait a bit, then destroy.

Even easier, listen to :GetPropertyChangedSignal(“CFrame”) for each part

Example: (Written on my phone so I can’t format right)


for i, c in pairs(workspace:GetDescendants()) do
  if c:IsA("BasePart") then
c:GetPropertyChangedSignal("CFrame"):Connect(function()
      wait(7)
      c:Destroy()
    end)
  end
end

1 Like

Because the explosion hit will only destroy the parts that are touched by the explosion, They do destroy joints and weld objects but some parts that are falling making other parts fall too.
I want to make that every part that is not in his original place will disappear…
Maybe, Some kind of an event which detects when the part doesn’t touch another part named “Part”?

What do you mean? When the upper parts fall too, Nothing will hold the middle part…

Oh, so you want parts to be able to knock down other parts while falling?

And also make them disappear…

Where should I put the script with “:GetPropertyChangedSignal(“CFrame”)”? In every part?

No. One script, listening for all parts. I gave an example in my post.

1 Like

So if I’m correct the your problem is that parts that are only jointed to parts that were hit by the explosion are being dropped because they aren’t jointed to anything. Have you considered looking at these functions:
https://developer.roblox.com/en-us/api-reference/function/BasePart/GetConnectedParts
https://developer.roblox.com/en-us/api-reference/function/BasePart/GetJoints

My problems is when parts fall, They make other parts fall, And I don’t know how to detect all of the falling parts

Have you looked at my reply? I explained how to do that, even going as far as to give code.

1 Like

Can you help me to write the script?
What to write before the “:GetPropertyChangedSignal(“CFrame”)”?

Read. My. Reply.

I basically wrote it for you already.

Oh, I didn’t see it
I will try it now, Thanks

Your thread doesn’t even ask a question anywhere. In the future, please be sure to include relevant information according to the category guidelines. The way you’ve worded your thread makes it sound like you’re asking for code.

On the other hand, maybe you have a question in here but it shouldn’t take me reading through over 20 replies to find the question. Handle it in the OP.

1 Like

For some reason it’s not waiting the 7 seconds, destroying them right after…