Should I be using .Touched for projectiles?

Pretty much I’ve made projectiles before but I really wanna crack down on the best and most effective and cleanest way of making a projectile. I’ve already decided to use tweening to actually move the projectile towards its target. But what is the best way to determine when a projectile hits something? Should I be using .Touched? I know .Touched isn’t the best thing to use so I was wondering if there was anything else I should use to determine when to damage someone.

I cannot use raycasting as my projectiles aren’t instant so that would be a rather poor and illogical way of finding a target.

1 Like

use Raycast, I think it help you!

1 Like

I think using :GetTouchingParts() would be better to use with tweens as CFrame manipulation can cause .Touched to not trigger. It would also allow you to control the frequency of collision detection and better performance management

@bjdanh266 suggest rays which would work but as you would have to repeatedly create rays within the part it would effect performance more and make it more complicated than it needs to be

2 Likes

So should I be constantly using gettouchingparts as the projectile flies until it touches something?

You would want it on a loop with a tiny decimal in wait() to prevent it from effecting performance.

So it would be while the projectile is moving

1 Like

Alright! Thank you very much for the help! Really appreciate it! :slight_smile:

1 Like

a great alternative choice for you!

1 Like

Wow, very coincidently i needed this to for my guitar hero remake.

1 Like