How to explain that .touched is bad for hitboxes

i made a script that loops through all bullets in the game move them and raycast to check if they hit something
meanwhile my friend is saying he will use .touched and body velocity i keep telling him its not reliable if the player is laggy/has performance issues/tab glitching and the bullets are fast so at some frames they will just jump from a position to another and .touched will not fire

The frame rate being lesser has a higher margin of error which would turn these methods rather unreliable. You might not be able to consistently hit it, but also sometimes it will double the input more than you necessarily want. All these are pretty impactful against performance in a large-scale production.

1 Like

Touched is great for rapid prototyping but it has a ton, a ton of issues. Example that I ran into just yesterday is TouchEnded fires when items are unequipped even the queried object is still touching the part.

I don’t think I could have put it better than the bullet example. If your game has fast moving objects like bullets there is no compromise here. That is a really difficult situation to be in where you have to communicate with someone without having any sort of compromise.

You may want to show him a video of why Touched does not work and that may better serve to communicate than just explaining. I am sure someone else has made an easy-to-understand visual that will make it easier to understand why it’s better to go the hard way instead of what Roblox has canned for you.

If it is a “I don’t want to program this because I already made something that works or I don’t really get the other way” situation then you could look at some external modules that do this too if you’re comfortable with that!