enemyName is not a member of a component. Its just only name. So try:
enemyName = enemy.GetComponent(enemyHUD).name;
And for your game performance its better to use FindGameObjectsWithTag once in the start function.
enemyName is not a member of a component. Its just only name. So try:
enemyName = enemy.GetComponent(enemyHUD).name;
And for your game performance its better to use FindGameObjectsWithTag once in the start function.