Can you add a function to my script that makes the dummy go after the player or to a specific part position

  1. What do you want to achieve? Keep it simple and clear! I Need a function that makes the dummy chase either a specific part or chase the player

  2. What is the issue? Include screenshots / videos if possible!
    I dont know how to do it…

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i tried using "v:IsA ‘Partnamehere’ " but it didnt work

Here’s my script

2 Likes

--]] local SearchDistance = 100 -- How far a player can be before it d - Pastebin.com my script Edit

2 Likes

If you simply doesn’t know how to do it and want to keep it simple i recommend watching this tutorial as i don’t want to script a whole pathfinding system for you. AI Monster Pathfinding -Teddy Horror Game #2 - YouTube

1 Like

Thx for the help ill try seeing the tutorial

2 Likes

You are welcome, i hope that you will find it usefull.

1 Like

oh and i dont need the pathfinding system i just need the part where it goes for a specific part

2 Likes

To make something move to a specific part, you would do something like this

local part = workspace.Part
local dummy = workspace.Dummy

--MoveTo makes the dummy walk to the position you put in args
dummy.Humanoid:MoveTo(part.Position)
1 Like

Thank you, ill try it out right now

1 Like

If you have an obstacles in the way, try to take a look at Pathfinding AI

1 Like

i just have one problem, how to make the dummy go after the part and the player?

1 Like

You should just need to put a server script inside of the dummy. If you copied the script from the link, just use FollowPath(Destination), and set Destination to the Vector3 you want to use.

1 Like

Can you give me an example i dont know how to do it

Here’s an Dummy who will go to the closest player.