[Solved] Script doesn't always run the same way on Android

I’ve got a short and simple script that adds a parallax effect to my background. It looks pretty good in the editor, but when I build the game for Android, the script only works around half of the time that I run the game, the other half my background just sits there not moving at all. And here’s the strangest part: I placed a UI text element on the screen that displays the current velocity of the background, which should be exactly 50% of the player’s current speed. The text element reads the proper velocity whether the background moves properly or not. Here’s my code, any insight you can provide would be greatly appreciated.

Note: The background I am using is several tiled images, and the value for BackgroundWidth is the width of one of these tiles, so that when the background is moved, the transition appears seamless.

    using UnityEngine;
    using UnityEngine.UI;
    using System.Collections;
    
    public class ParallaxScript : MonoBehaviour {
    
    	public float BackgroundWidth;
    	public GameObject ErrorText;
    
    	void FixedUpdate () {
    		GameObject player = GameObject.FindGameObjectWithTag ("Player");
    		this.GetComponent<Rigidbody2D> ().velocity = player.GetComponent<Rigidbody2D> ().velocity / 2;
    		if (this.transform.position.x <= (player.transform.position.x - BackgroundWidth)) {
    			Vector3 pos = this.transform.position;
    			pos.x = pos.x + BackgroundWidth;
    			this.transform.position = pos;
    		}
    		ErrorText.GetComponent<Text> ().text = (this.GetComponent<Rigidbody2D> ().velocity).ToString ();
    	}
    }

Found the problem! After about 5 hours of pounding my head into a wall… The issue was a bug with Unity’s Rigidbody2D component itself. When you freeze movement on either the X or Y axis in the component itself, it runs perfectly fine in the editor, but when compiled it tends to freeze BOTH axes instead of just the one, but not all of the time. I rewrote my script to ignore the player’s movement along the Y axis instead of locking the background’s Rigidbody2D movement along the Y axis and this works just fine.