I want Basepart:GetConnectedParts() to also take into account hinge constraints and not just joints

I have a race game called bloxy roads. It involves an element of destruction and taking damage.

It felt a godsend having the :GetConnectedParts because I could check for any loose parts and remove them from the car model but an issue arrived because the car steering wheel was only attached via a hingeconstraint and the script would remove the steering wheel since it wasn’t a hinge constraint.

I really want the hinge constraints or at least in a parameter of :GetConnectedParts to also consider hinge constraints. It would help withh my game

2 Likes

Does anyone know how to achieve this? I also need a way to access all parts connected by weld constraints AND hinge constraints in order detect a rigid vehicle made in a vehicle building game (which can have things like motorised hinge constraints and servos)

I believe BasePart | Roblox Creator Documentation takes into account constraints as well from what I have tested in the past.

It doesn’t work with hinge constraints or other moving constraints. I have tested it an the only constraint it will work with are the weld constraints. it also mentions this in the documention:

"This only applies to the following joint types:"

  • Weld
  • Snap
  • ManualWeld
  • Motor
  • Motor6D
  • WeldConstraint

??? It work doe, nvm mixed it up with get joints.

It doesn’t print Part1. It only prints itself. So no, it doesn’t work.

Oh whoops, I believe it’s this other thing BasePart | Roblox Creator Documentation it’s the only way I believe it’s possible to detect these joints.

aha, by searching through some old forum posts, I have found this reply which seems to be exactly what we are looking for:

Also turns out :GetJoints doesn’t return weld constraints. So this seems to be the only solid solution

1 Like

The idea is to encourage roblox engineers to add a feature for this need

Well then this thread should be under #feature-requests:engine-features