using UnityEngine; public class KeyPickup : MonoBehaviour { public static bool hasKeys = false; private void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { hasKeys = true; Debug.Log("Picked up the keys!"); Destroy(gameObject); } } }