What unit does magnitude use? Kilometers? Studs? Miles?

Is the magnitude Studs? Or is it kilometer or miles.

It doesn’t use any particular unit. The unit of the result you get is determined by the unit of the vector you input. So if you have a vector representing a translation in nautical miles or whatever, the magnitude of that vector will be in nautical miles. The numbers in the Position and CFrame properties are in studs, so if you do something like (B.Position - A.Position).Magnitude then you’ll get A-B distance in studs.

1 Like

Magnitude in vectors is the distance between the origin and the result …
In Roblox, the origin for vectors is (0, 0, 0).
Vector3 (x, y, z), Magnitude would be sqrt(x ^2, y ^2, z ^2).
As 1 Magnitude = 1 stud of distance.

2 Likes