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:
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.
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.