I Have vehicles that fall apart when they collide, I would like to have the vehicle parts fly outward after the impact but by using explosions there is no filter as far as I know on what parts it breaks/ flings. is there a way to accomplish this?
If you want parts flying away like explosions.
Use bodymovers or velocities and use a CFrame’s LookVector.
CFrame.new(position_of_part, position_where_you_want_it_to_go).LookVector * force
If you multiply the LookVector by a x number it will increase the force.
(Correct me if I am wrong.)
wouldnt that involve putting bodymovers inside each and every part? and also I just want them to fly out for a time as they will be cleaned up shortly.
You can set their velocities manually or use Debris service to remove the body movers and parts after like x seconds.
game:GetService("Debris"):AddItem(bodymover, 1) game:GetService("Debris"):AddItem(part, 3)
If you’re using the Explosion object, forces are automatically applied to parts in the explosion but it can be understandably problematic if unintended side effects (such as dead players) appear.
What you can do is turn off the joint destruction radius so that no joints are destroyed from the explosion (and thus no players are killed). The only thing that will become relevant is the force.
Once you’ve nullified the destruction radius but kept the force radius, what you can do is call BreakJoints on the car right before you add the Explosion effect to the car. This combination of functions will ensure that the car breaks apart and use the force applied from the Explosion to fling the parts.
This is the closest you can get to flinging parts without object destruction while keeping an Explosion instance and not using a filter.
You can still use an explosion, just disable the forces of it, and connect to the Hit Event. Following the tutorial on the developers page should help.
then you can sort through whatever is hit manually and make the parts fly off.
ive noticed weird behaviour on BreakJoints with the new WeldConstraints, they will reactivate causing flying connected parts, so he shoiuld use explosions, get explosions hitparts and kill the WeldConstraints too