The first Vector3 is Position, and the 2nd Vector3 is LookAt.
The final print is the CFrame.
In the case of my code “Origin” is the first V3 printed out, and “ToPos” are in the 2nd V3 printed out. Separated by the blue line.
“Origin” is the current position, and ToPos is the LookAt. Both are Vector3. The reason Origin.Y is the Y coord of the LookAt is because I don’t want the CFrame to angle towards the ToPos.Y position. Hence using Origin.Y.
And again the 3rd printed item is the CFrame construction (attempt).
When I construct a CFrame like this; CFrame.new(Origin,Vector3.new(ToPos.X,Origin.Y,ToPos.Z)) it sometimes causes it to fail and returns NAN for certain vectors of the CFrame. Sometimes, but not always.
Sorry I had forgotten to mention, “Origin” is the first V3 printed out, and “ToPos” are in the 2nd V3 printed out. Separated by the blue line here.
“Origin” is the current position, and ToPos is the LookAt. Both are Vector3. The reason Origin.Y is the Y coord of the LookAt is because I don’t want the CFrame to angle towards the ToPos.Y position. Hence using Origin.Y.
And again the 3rd printed item is the CFrame construction (attempt).