Head Hitbox Script ((full)) -

RaycastHit hit; if (Physics.Raycast(fpsCam.transform.position, fpsCam.transform.forward, out hit, range)) Health targetHealth = hit.collider.GetComponent<Health>(); if (targetHealth != null) bool isHeadshot = hit.collider.CompareTag("Head"); int finalDamage = isHeadshot ? headshotDamage : normalDamage; targetHealth.TakeDamage(finalDamage);

void Update()

void Shoot()

local DAMAGE_NORMAL = 20 local DAMAGE_HEADSHOT = 60 local HEADSHOT_MULTIPLIER = 3 head hitbox script