Raycast align with ground normal

I felt this was a better place to ask this, rather than the forums. Ok, so I have a car that I can move around and I need it to align itself to the ground normals for a Mario Kart/Little Big Planet Kart type of physics. The script I have has some problems. Whenever it “aligns” me to the ground normals it sets my Y rotation to the specific rotation every time. It also doesn’t align me often enough. It usually only works when I go up and down slopes. It is in the Update, so that’s not the problem.
Here is my script so far:

	var hit : RaycastHit;
    var castRot = Vector3(transform.position.x,transform.position.y-.50,transform.position.z);
    if (Physics.Raycast (castRot, -transform.up, hit)) {
        transform.rotation = Quaternion.FromToRotation (Vector3.up, hit.normal);
    }

Does anybody have an idea of what is wrong?

My answer to this question shows a script that aligns a CharacterController vehicle to the ground (aligns its transform, not the CharacterController: the CC is always upright). This script works fine for regular terrains, but may fail when the terrain steepness is too high, specially if it turns upside down. For a more generic case that can handle vertical or upside down surfaces, take a look at my answer to this question - it uses a rigidbody instead of a CharacterController, which may be more convenient for a vehicle.

I found transform.up-=(transform.up-hit.normal)*.1; to work really well.