I have a simple health script that displays the health to a 3d text object above the enemy but I get the follow error
Cannot convert “float” to “string”
How do I fix this? My code (javascript)
var EnemyHealth : float = 10f;
function update(){
GetComponent(TextMesh).text = (EnemyHealth);
if(Input.GetMouseButtonDown(0))
{
EnemyHealth -= 1;
}
}