Hello
I am trying to create a boat that is destructible (all BaseParts). I want the boat to have physics, so that it can float above water. I’m having some difficulty trying to create realistic looking destruction.
I currently have all the parts welded to a VehicleSeat, the problem is that when an explosion hits individual parts (not the VehicleSeat), the parts don’t unweld that well. Some parts also float in mid-air once their support parts have been destroyed.
When I hit the VehicleSeat with an explosion, the entire boat collapse as all welds are broken.
How could I achieve a more realistic destruction effect?
What I want to achieve:
No floating parts (when part is not connected to any neighbouring parts it has to fall down to)
Not all welded to one part (to prevent entire boat collapsing in one hit)
Preferably automated (The ship has many parts, that I don’t want to weld manually)
This is just an idea, haven’t tried it out, but don’t put all the welds in the VehicleSeat.
Try putting the weld in the furthest Part and weld it to the next touching Part and create a ‘chain’ of Parts (containing 1 weld each) that go to one major central Part. That way if the center gets hit all the different chunks of boat won’t get destroyed, but will break away from the main Part. As the Explosion breaks joints in it’s radius it should realistically break the boat apart.
I have tried that, but it takes alot of time and is very easy to mess up.
I probably did something wrong when doing that because the boat just fell into pieces.
This might work but is not really feasible for me. I am more looking for an automated solution (if there is any).
I created a script that uses GetTouchingParts to weld touching parts together.
for _, v in pairs(workspace.Boat:GetDescendants()) do
if v:IsA("BasePart") or v:IsA("WedgePart") or v:IsA("VehicleSeat") then
local touchingParts = v:GetTouchingParts()
for _, part1 in pairs(touchingParts) do
local weld = Instance.new("WeldConstraint")
weld.Part0 = v
weld.Part1 = part1
weld.Parent = v
end
end
end
This works great for me and eliminates all the problems I had before.