Then the car will rotate higher than the road’s orientation, meaning the end orientation will be wrong.
The problem is not in the rotation, but in the position.
Well I guess you are doing something wrong because these should work;
local Length = 27
local direction1 = ( Vector3.new(0,-Length,0) ).Unit * Length
local direction2 = ( (origin+Vector3.new(0,-Length,0) )-origin ).Unit * Length
I get an “attempt to index nil with Instance” error because the ray doesn’t detect anything.
If any of your “methods” work, then the position issue is still there.
Tbh raycasting is so hard and probably overkill.
Is there an easier way to offset the car, maybe I need to include something in the orientation-setting line? (Line 9 of the original script)
LookVector to the left. If the line is of course, in the centre. If not, then this won’t be helpful.