How would you go about a tracking part?

Hello Developers!

I’ve looked over devforums and other media sites but couldn’t find a good answer.

So I want to create a tracking move by using parts, but I’m not sure how to do the tracking part. Not too sure how what method to use. So how would I go about making a part track a humanoid/player and what method is the best?

I don’t understand, a tracking move by using parts?
Like, parts tracking object?

Yes, I want a part to track a object/player. It’s going to be a tracking move that damages upon impact.

Maybe, you can use for example, a rope constraint image
Something like this, for it shows like a ‘tracking’ way?

That’s not exactly what I’m looking for.

It’s going to be a move that shoots out a “Fireball” and the fireball will auto-track the nearest humanoid and cause damage upon impact.

Get the closest part with a magnitude function then then set the ball to the position. I similar system in my football game in my AI zone coverage Script. Just use move to function and move to the humanoids root part. Position.

Oh, you can use Raycasting for this, to prevent it goes trough objects, I do not exactly know the answer, but maybe you can use Pathfinding service?
I don’t know if it works with other objects, correct me im im wrong, and using some tweenservice and raycasting you can make it moves smoothly to all the waypoints until it hits a player!
You can just loop a ray to detect if it hits an object or a humanoid body part.

I don’t know if pathfinding service works for parts

You can use :DistanceFromCharacter() to get the nearest player by looping the Player service and use the run service to keep getting the nearest player.

It doesn’t I’m pretty sure. It needs a humanoid.

I know how to get the distance from the player, it’s the tracking that I need help on.

Do you have discord. Cliffon#2633 I can show you some scripts that do what your trying to do. I don’t feel comfortable posting them on open forums.

Yes, I’ll send you a friend request. Thank you.

1 Like

Alright waiting on your request.

Actually, no, it doesn’t needs a humanoid :stuck_out_tongue: