I have a model (all of the unanchored parts are welded to eachother) that you can destroy bits of but I need the model to stay in place.
My original idea was to weld one of the parts to an anchored part, which works until you destroy what it was welded to. I tried to fix that by welding it to another part before destroying that float weld, but it just causes problems.
How should I accomplish this? Would something as simple as bodymovers work? I don’t know lol
Thanks
Yes if you use a BodyVelocity with a MaxForce of 1e8/math.huge on all axis it will not be moved even if unanchored. Maybe make a small part and weld the PrimaryPart of that model to it, then add the BodyVelocity to that small part and make sure that the small part can’t be destroyed. Some kind of little “core” of the actual model.
I think the issue is that the ‘small part’ and the PrimaryPart could get disconnected. You can destroy everything in the model. So let’s say I weld it to the primarypart and the primarypart gets destroyed; it falls. Or, if the parts around the primary part gets destroyed (parts are welded to the part next to them) then there is no BodyVelocity source so I just assume it’ll fall.
That’s the main issue when you make something ‘floating’ that you can destroy the Welds on.
What if it was all Anchored and you scripted the Parts that were within the ‘zone of destruction’ to become Unanchored?
You can’t really have it both ways, unless you find a way to have the Parts stay in place until they’re destroyed and if there are Parts above them then destroy those as well.
No matter how you do it, your first problem is that you need to define a rule set for how it behaves. Here’s a couple of ideas.
A couple of engines or boosters of some form keep it floating, so you have realistic points that you can keep anchored or guided. You can also easily script it so that an engine will fall if there is not very much left connected to it, so you don’t get a bunch of floating engines when the station is gone. This is a pretty easy solution and arguably one of the most practical.
A little more complicated but possible, you could have the largest chunk of the station remain anchored, and cause anything smaller to fall. This could get resource intensive though and I wouldn’t recommend it if the game has a lot more going on than just this floatation system. You could totally try it though.
You could also have any explosions automatically unanchor the parts that they blow up. This can result in the scenario that you drew a picture of, but at some point you need to consider how much time or resources this problem is worth to you.