Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What does CFrame.lookvector return?

Self explanatory. .

1 comment

0

You have a high enough reputation that you should know this kind of question will be closed.

3 answers

✓ Accepted answer

It returns a so called Normalized unit, if you were to draw a straight line pointing the same direction as the part, and if that line was 1 stud long then the return value would be the end of the line relative to the beginning.

Returns 0,1,0 or 0,-1,0 example 1 is facing up 2 is down. Its a turning %.

It returns a unit-lengthed / Normalized-unit vector relative to the world. You can use it to for example have a part hover in front of you like so, Part.Position = HumanoidRootPart.Position + (CurrentCamera.CFrame.lookVector * 5) . You could also use it to draw rays.

This discussion is preserved as it was. New answers, comments, and votes are closed.