How i can use FindGameObjectsWithTag?

using UnityEngine;
using System.Collections;

public class otro : MonoBehaviour {

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
    if (Input.GetKeyDown(KeyCode.H)){
        Destroy (GameObject.FindGameObjectsWithTag("enemy"));
    }

}

}

I try to use it and gives me error, someone could help me? if i use GameObject.FindGameObjectWithTag yes works but only with one object with this tag not alls.

Hey,

You can not destroy Array of GameObject as Destroy() takes only single gameobject.

So do this way:

GameObject[] objects= GameObject.FindGameObjectsWithTag("enemy");
		foreach (GameObject go in objects) {
			Destroy (go);
		}