how to make the player get's in the car?

how do i make the player gets in the car on DISTANCE = 0.5 like near it?

if (Vector3.Distance(player.position, car.position) < 0.5){
//get in the car
}