Camera not moving with car- How Can I change parent object while playing?

Hi, I am making FPS game, I have FPS controller, and two cars.
I have Camera in FPS Character, and another camera in one of cars.
Everything is fine, even if I enter a first car, I have there FPS camera , but when I enter second car,
camera is targeting on first car, and is not moving. I know why, because its parent object is first car.
So how can I change parent object of camera while playing?
I am using Unity 4.7. ,basic FPS character from Assets, and in car Mouse Look Script.
I tried create another camera, i putted it in second car,but it doesnt worked.

You can check for a collision or trigger however you want to detect the thing and then you can change the parent by

transform.parent = other.transform;