NullReferenceException: When accessing bools from another game object's script.

So I have this code below. What it does is simulate the floor moving by offsetting the texture material at a certain pace. That is not important, however, as my problem lies within line 16. I have a bool “dead” as a variable in my Platformer2DUserControl.cs. It is attached to a fish. Everything moves with the fish as he goes through the level (that is why I have the texture offset, so it looks like the floor is stationary). I want this floor scrolling to stop when the fish dies because the fish stops when he dies.

Everything actually works out as planned. As the fish moves, the floor texture scrolls backwards and it looks like the fish is moving, when he dies the floor stops, and looks like I am not moving. But I still get this error.

EDIT: Okay, the floor is not actually scrolling. So nothing is happening after if(!Fish.dead) Is this not how you access a bool variable from another script?

`

using UnityEngine;
using System.Collections;

public class floorscroller : MonoBehaviour {

	public float speed;

	Platformer2DUserControl Fish;

	void Start(){
	
		Fish=GetComponent<Platformer2DUserControl>();

	}


	void Update () 
	{
		if(!Fish.dead){ //This is the line with the error (Line 16)
			renderer.material.mainTextureOffset = new Vector2((Time.time * speed)%1, 0f);
		}
		else
		{
			renderer.material.mainTextureOffset = new Vector2(0f, 0f);
		}
	}
}

`

// Figured it out, should have just called the script like so.

 using UnityEngine;
 using System.Collections;
    
    public class floorscroller : MonoBehaviour {
    
    	public float speed;
    	
    	void Update () 
    	{
    		if(!Platformer2DUserControl.dead){ //This is the line with the error (Line 16)
    			renderer.material.mainTextureOffset = new Vector2((Time.time * speed)%1, 0f);
    		}
    		else
    		{
    			renderer.material.mainTextureOffset = new Vector2(0f, 0f);
    		}
    	}
    }