Constucting CFrame with LookVector

I’m trying to get a CFrame to use with Humanoid:MoveTo() with lookvector and a magnitude like part.CFrame.LookVector * 5 so 5 studs ahead of the part’s face but I don’t really understand CFrames. I have no idea how all the CFrame constructors work besides lookat and new which is my problem and I can’t understand

Any help appreciated :slight_smile:

1 Like

You can just use this:

1 Like

Cross the LookVector with the pure up vector <0, 1, 0> to get the RightVector. Then cross the RightVector with the LookVector to get the UpVector. I believe you can use those three vectors in one of the CFrame constructors.

1 Like

Thank you, I think it’s called fromMatrix