Hello! I’m relatively new to CFrames and I couldn’t find anything on what I’m asking.
I’m trying to find out a way to make a part that has a different orientation match another part’s orientation without changing the orientation of the original part.
2 parts are rotated to face the same direction, but they both have different orientations.
I presume you want to keep the position of both parts different, bit you can use the part.CFrame.lookVector property to get a part’s pointing direction.
To match the orientation it has to be 0,180,0 for some reason, I’m trying to figure out a script method to that automatically so I don’t have to keep doing it.
Also same with the guy’s response above.
I think I might have to do something with offset, not sure.
Oh just realised you said they don’t face the same direction.
Since even if they have different rotations, their dimensions shouldn’t change (meaning the width would be the same width, and same thing for length and height), so you can set the 2nd part’s size to the 1st’s, with the changing of the rotation
Shouldn’t the second Cframe argument there be part1.Position+part2.CFrame.LookVector?
The second argument is the position to face, the look vector is an offset from the origin / unit vector.
The short answer is no. The reason is that the two parts have misaligned surfaces. The Front surface of Part1 does not match the Front surface of Part2. This isn’t too descriptive but let me know if you have any questions.