using System.Collections; using System.Collections.Generic; using UnityEngine; public class RingCatcher : MonoBehaviour { private void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Ring")) { AudioSource source = other.gameObject.GetComponentInParent(); source.Play(); Destroy(other.gameObject); } } }