Align orientation of a model?

Hi so my problem is simple, I have 2 models a red brick and a blue brick.
Here they are

red and blue brick

As you can see they are both orientated differently

How can I align these models so that the blue brick also faces forward using :SetPrimaryPartCFrame?

red and blue brick 2

1 Like

Use the CFrame constructor and use the blue brick’s Position vector and use the red brick’s Look vector on the blue brick.

BluePart.CFrame = CFrame.new(BluePart.CFrame.Position, RedPart.CFrame.LookVector)

It doesn’t really matter, but I am just going to point out that CFrame.p was deprecated in favour of CFrame.Position. This provides a more readable property and fits in with current convention over a single lowercase letter that doesn’t really say anything.

2 Likes

I’m used to the old p member of CFrame as opposed to Position. Probably a bad habit to fall into since p is deprecated like you said. I’ve changed it now so it’s more up-to-date, so thanks for pointing that out for me.