Self-Driving Vehicle

Hey guys,

currently i create a gamemode, where i need cars, that automaticly drive.

I have several cars of citizens, and they have to move on street.
“Street” is relative, i want to make them follow waypoints, i set on streets.
But i do not have enough math skills to make it working.

It would be very grateful, if someone with enough skills could make me a lua function that calculates the angle between 2 vectors.
To make car driving, to make it heading to an angle, is not the problem. Only this function is.


local ang = (TargetVector - Position):Angle()