Power Bar isn't showing up?

So I have this script, and it allows me to hold the space bar to build power and when released, launches my object from a cannon. However, I can’t get the texture for the bar to show up at all. It says the GUI texture is being reference, but missing, but I added a GUI texture to it and it didn’t change it.

var fullWidth : float = 50.0;
private var thePower : float;
var increasing : boolean = false;
var shooting : boolean = false;
var barSpeed : float = 25;
var airplane : Rigidbody;
var spawnPos : Transform;
var shotForce : float = 0.1;
 
function Start(){
 guiTexture.pixelInset.width = 0;
}
 
function Update () {

  if(!shooting && Input.GetButtonDown("Jump")){
   increasing=true;
  }
 
  if(!shooting && Input.GetButtonUp("Jump")){
   increasing = false;
   Shoot(thePower);
  }
 
  if(increasing){
   thePower += Time.deltaTime * barSpeed;
   thePower = Mathf.Clamp(thePower, 0, fullWidth);
   guiTexture.pixelInset.width = thePower;
  }
}

function Shoot(power : float){
 shooting = true;

 var pFab : Rigidbody = Instantiate(airplane, spawnPos.position, spawnPos.rotation);

 var fwd : Vector3 = spawnPos.forward;
 pFab.AddForce(fwd * power * shotForce);
 Destroy(pFab.gameObject, 60);
 

 guiTexture.pixelInset.width = 0;
 thePower = 0;

 shooting = false;
}

What am I doing wrong?

In order to draw the texture you need a variable to store the texture in, and some GUI function calls in OnGUI.

var myTexture:Texture2D;

function OnGUI(){
GUI.DrawTexture(Rect(100,100,thePower*5,30),myTexture);
}

In order to draw the texture you need a variable to store the texture in, and some GUI function calls in OnGUI.

var myTexture:Texture2D;
 
function OnGUI(){
GUI.DrawTexture(Rect(100,100,thePower*5,30),myTexture);
}

Thanks a lot Professor Snake!!!