How to make the front of a part always facing the front of another part?

I’m not really good with CFrames and all that kind of stuff. I’ve tried lots of things but it still won’t work.

Have you tried welding the one part to the other, so it stays locked a certain distance from the other part? That is my best guess.

You haven’t given us much to go off of (ie an example of how this would be used, what solutions you have tried, what exactly you are looking for) so it is unclear. Best of luck

I want a camera to be facing a part for a viewport frame

Ah, that’s a bit trickier. I cannot assist you as well on this

To make a part look at another part you can use this line of code.
Part.CFrame = CFrame.new(Part.Position, TargetPart.Position)
If you have any questions feel free to ask them!

I tried that in my script, but it still did not work. It is facing a part, but not the front.

set its rotation and positional components (cframe) to be the part u want it to face then multiply its positional matrix by the look vector of the part u wanna face. The scalar is the stud offset

synapse

partA.CFrame = partB.CFrame * (partB.CFrame.LookVector * 5)
2 Likes

invalid argument #3 (CFrame expected, got Vector3)

add the lookvector instead of multiplying

1 Like