I have this script that fires a ray that hits anything within 5 studs of the Player's torso but it seems to only fire in a small straight line making it hard for the ray to hit moving targets. Is there a way to make rays "wider"?
local PUNCH_RANGE = 5 local torso = Player.Character.Torso local ray = Ray.new(torso.Position, torso.CFrame.lookVector * PUNCH_RANGE) local part, endPoint = workspace:FindPartOnRay(ray, Player.Character)
The short answer: You can't.
The long answer: Rays are simply lines. That's it. They don't have a width, they only can detect things along its path. Maybe you can make multiple rays in a circle if you need to.