Gravity problems.

Hello all, I have a question, see I’m changing gravity but it only works sometimes, like maybe 1/10 of the time? I have no idea why this is?

This is the code:

#pragma strict
var Vector : Vector3;
function Update () 
{
        #if UNITY_WEBPLAYER
        Vector = new Vector3(Input.GetAxis("Horizontal"),-1,0);
        Vector.Normalize();
        Physics.gravity = Vector * 9.81;
        //Debug.Log("" + Physics.gravity.x+","+Physics.gravity.y+","+Physics.gravity.z);
        #endif
        
        #if UNITY_ANDROID
        Physics.gravity = Input.acceleration * 9.81;
        #endif
        
}

Just a guess, maybe the rigidbody is sleeping sometimes?