void Update()
-- Place this script inside the weapon's handle or a server script local tool = script.Parent local handle = tool:WaitForChild("Handle")
-- Raycast from character's head forward (example aiming) local head = character:FindFirstChild("Head") if not head then return end
Debug.Log(isHeadshot ? "HEADSHOT!" : "Hit");
local result = workspace:Raycast(head.Position, direction, raycastParams)
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);
El 9 de abril comenzamos una formación sobre SOLIDWORKS Composer
Modalidad: Streaming
Fechas: 9, 10, 13, 14 y 15 de abril de 2026.
Horario: 09.00 a 13.00 horas
Incluye licencia de SOLIDWORKS Composer
Limite de inscripción 7 días antes