You need a new variable, for example:
var is_Player_in_car = false
is_Player_in_car == true, you use the script for either the car or the player to move and the other to follow it. So you only use one to control the movement. (For following the one that is controlling the movement so they will look like a single object, you can use something like this:
A.position = B.position)
Otherwise if the player is not in car, move the player as how it moves without bothering the car.
When you press F and when the condition that you are close to the car is true, turn
is_Player_in_car to true, and make one of them to lock its position to the other that controls the movement. (You decides which one to control the movement, it can be player or the car, both are fine)