Make Health appear as text and not texture

Right I followed a Youtube Tutorial and the guy made it so that my AI health appears as a texture, I would like to use this in the future but not right now I want to be able to make my AI HP display as ‘Text’ using the GUI function I did try get two codes ‘My player’ code and put it into the code below to display the text but didn’t work. Can anyone help me out? I don’t just change it to ‘GUI.Text’ do I? as it’s already ‘GUI.Label’

var health = 10;
var TakeDamage : boolean;
var healthfull : Texture2D;
var texturewidth : int;
var textureheight : int;

function OnTriggerEnter(other : Collider) {
	if (other.tag == "Player"){
			TakeDamage = true;
		}
}

function OnTriggerExit(other : Collider) {
	if (other.tag == "Player") {
			TakeDamage = false;
		}
}

function Update(){
		if(TakeDamage){
		if(Input.GetButtonDown("Fire1")){
			health --;
		}
	}
	if(health <0){
	print("Enemy Down!");
	health = 0;
	Destroy (gameObject);
	}
}

function OnGUI() {
	if(health == 10)
	{
		
		GUI.Label(Rect(10,40,texturewidth,textureheight),healthfull);
	}
}

Look up what GUI.text and GUI.label do from the docs. Ex: Unity - Scripting API: GUI.Label

It tells you that label can display a texture, or a word(string) or both (but you need to make a GUIStyle, which you can also look up.) In other words, if you replace the bottom healthfull with "cows" you should see that word (but you’ll need a GUIStyle to change fontSize, etc… .)

Experiment with just putting a word on the screen – like in a script that only has OnGUI and a single GUI.Label. Once that works, bring it into your health script.