Can you add this function to my script please?

  1. What do i want to achieve? I need someone to add a function that makes the dummy go after a part if possible but only if it is on their sight like a humanoid. (the script has everything i just need to make the part where the dummy searches for a specific part)

  2. What is the issue? Include screenshots / videos if possible!

I dont know how to make that happen

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i ve tried doing some edits but it didnt work how i wanted to

i just need it to search for that specific part (random part name) heres my script

I found something that might be what you want

ok ill check it out right now thanks

i understood how to do it thanks.