As the title says. I’ve tried Region3, and it seems pretty buggy if multiplied with CFrames, I’ve tried Raycasts but they’re mainly just a straight line and isn’t good for checking multiple stuff (at least I believe so), and magnitude can’t check which direction. Touched I didn’t consider cause it’s only whatever the player touches.
What are your opinions?
Having a part with a .Touched event appear infront of you (With canCollide to false and Transparency = 1) might work.
Part = script.Parent
Part.Touched:Connect(Function(hit)
if hit then
-- What you want to happen to what ever it touches
end
end)
All you have to do is script the part to be infront of the player.
The best way imo tho would to use raycasting and to have a raycast infront of you the entire time.
If you want multiple parts to be detected, look at thishttps://devforum.roblox.com/t/ray-detecting-multiple-parts-at-once/243485
If you need something like a melee hitbox, you should take a look at this module, Raycast Hitbox 4.01: For all your melee needs!.
This is THE BEST type of HitReg I have ever used, I have used every other type of HitReg possible and the HitReg this module provides is BY FAR the best.
It’s actually pretty easy to use too, I spent a couple of days learning how to properly use this module and it is one of the best decisions I have made. By the way, make your hit boxes client side if they are for melee weapons, JUST MAKE SURE TO ADD SANITY CHECKS though.