Everyone I could use some help, I’m using Raycast to throw a punch. The problem is when trying to check if the opponent blocks, the block is just a bool. Here’s the code, thanks for at least trying to help.
RaycastHit rayHit;
if (Physics.Raycast(transform.position, transform.forward, out rayHit, attackRange))
{
if(??)
{
damageToDeal /= 2;
}
rayHit.collider.SendMessageUpwards("ApplyDamage", damageToDeal, SendMessageOptions.DontRequireReceiver);
}