How can I have the barbed wire explode on my D-Day map?

I have made Bangalores that explode the barbed wires on my d-day map however nothing happens to the Bangalores when the explosion goes off and when I turn off the anchor the barbed wire falls apart instantly.
Here is the barbed wire:


Here is the barbed wire model:

Any help would be appreciated and sorry if I sound stupid, I’ve only ever used blender and all I would have to do there is add a rigid body simulation.

Thanks in advance!

1 Like

The quickest solution I could think of would be to insert a Welding Script in each Barbed Wire model. (You could, alternatively, group all the barbed wire sections into a single model, thus only requiring a single weld script.)

Here is the code:

local BrickTable = {}

function RecursiveGeneric(Parent, Func, ClassLimit)
 for _, Child in pairs(Parent:GetChildren()) do
  if not ClassLimit or Child:IsA(ClassLimit) then
   Func(Child)
  end
  RecursiveGeneric(Child, Func, ClassLimit)
 end
end

RecursiveGeneric(
 script.Parent,
 function(Brick) table.insert(BrickTable, Brick) end,
 "BasePart"
)

local Base = BrickTable[1]
table.remove(BrickTable, 1)

for _, Part in pairs(BrickTable) do
 local Weld = Instance.new("Weld")
 Weld.Part0 = Base
 Weld.Part1 = Part
 Weld.C1 = Part.CFrame:inverse() * Base.CFrame
 Weld.Parent = Base
 Part.Anchored = false
end

Base.Anchored = false

You may still need to anchor something, such as the wooden crosses, to keep the wire stationary, but other than that, it should work properly.

1 Like

thank you I’ll try that out and tell you if it works!

1 Like

thanks, I did it on a test map and it worked!!

1 Like