Moving a model relative to attachment to another attachment in another model

You can write your topic however you want, but you need to answer these questions:
I want to make these two parts connect by their attachments that are inside them. I want to achieve this by moving the whole model. Preferrably with PivotTo()

image 1

The issue is that I can’t seem to figure out how to do it properly?

So far, I tried this solution: Moving a part to another part based on attachment

but it didn’t work well for me. If anyone could please help, I would really appreciate it.

1 Like

Do you care about the attachment orientation or only their position?

position only for now, although it would be nice if rotation was supported too

i want to connect model 2 to model 1 by their respective attachments

ok i am hopefully bumping this so someone can see this

ok this would hopefully be my last bump

okay. If you only care about position here’s what you should do:

  1. Get the offset from the attachment to their parent part.
  2. Now add the offset to the parent part position. Now you have the attachment’s world position.
  3. Do the same for the other part.
  4. Get the difference in position for the two world positions you’ve just calculated.
  5. Move one of the parts by that difference.

also reminder:

A->B = B-A where A is the first position and B is where you want to go.

alright ill try this when i get the chance, thank you

thanks a lot, this helped me greatly,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.