For the few weeks I have been trying to find a good way to detect hits. I have used multiple methods, and my issues were either they were inaccurate or performance heavy. I really need help, and I am a relatively beginner scripter (2 months), so please keep it simple. Last thing is PLEASE DO NOT RECOMMEND RAYCAST HITBOX MODULE, I REALLY WANT TO CREATE SOMETHING BY MYSELF
Make a script that spawns a transparent part (hitbox) in front of the player when they press the keybind to attack. i’m not a good scripter, so i dont know how to make this, but i hope this is enough! goodluck!
Thank you, and that is what I have done. The thing is I do not know what the best way to detect the parts inside the hitbox without it being inaccurate or performance heavy. Thank you for your reply!
To detect the parts inside of the box you can use Region3
Okay thank you. Isn’t that method deprecated though? And is it performance heavy?
You can use part:GetTouchingParts()
but I suggest just using Region3. It is slightly performance heavy but it shouldn’t effect the game too much.
don’t use region3 they are the past and everyone using it should stop. People need to focus on the performance and gameplay or things not just gameplay. Anyways use anything else instead of region3 I’ll link you to Roblox wiki where it gives you list of stuff for hitboxes.
When I make hitbox detection I really like to use workspace:GetPartsBoundInBox really easy to use.
Alright thanks, I will see what there is
Yea its really optimized and isnt very performance heavy, i will try it