using System.Collections; using System.Collections.Generic; using UnityEngine; public class Stunning : MonoBehaviour { [SerializeField] private float duration; private void OnCollisionEnter(Collision other) { if(other.gameObject.tag.Equals("Player")){//Collided w/ player, stun him other.gameObject.GetComponent().Stun(duration); } } }