What is the function of .unit?

I found .unit in an AI script that I have, it was an interesting thing, however, I don’t know exactly what you can do with .unit, I’ve searched in the developer hub for the API article, or in the forum, but I’ve not found anything about that, I don’t know if I could have any answer about that, or if there’s a link that could send me to a thread explaining that, thanks for reading :+1:.

5 Likes

Unit basically means one stud in a given direction. This is useful because you wouldn’t have to do extra calculations to extend something to something like, 5.56 studs:

Object.CFrame.LookVector.Unit * 5.56
3 Likes

Taking the unit of a lookvector is redundant since lookvector already returns a unit vector

14 Likes