I think so every time the trigger is entered the hitCoolDown = true and meanwhile in update every frame it gets updated and try
running your
if(hitCoolDown){
hitTimer += Time.deltaTime;
if(hitTimer >= hitCoolDownTime){
hitCoolDown = false;
hitTimer = 0f;
}
part of script which make an infinite loop and hangs your gameplay
↧