Have a character move right and left after turning a corner with a lane system?

how did you got the lane system working