using UnityEngine; public class Shield : MonoBehaviour { private void OnTriggerEnter(Collider other) { if (other.CompareTag("Bullet")) { Destroy(other.gameObject); } } }