How to make an NPC Follow the player?

If anyone knows how I could achieve this, thatd be honestly rad

weld a part offset from the character and have the NPC use Path finding to constantly move to that part unless its at that part.

or get a random CFrame or Vector position value from the players characters humanoid root part on the x axis (probably a negative one) and have it path find to there

pathfinding api reference here

pathfinding creates a series of waypoints along a calculated “valid path” to the desired location the way to make it walk is to loop through these waypoints and use NPC:MoveTo next waypoint

Is there another alternative to NPC path finding?

uhhh i think so with the AllignPosition pyshics thing its an instance.

but this will probably make the npc just float to a set place behind the character

Just make the NPC’s humanoid walk to the player if you don’t wanna use pathfinding

1 Like

only if there are no obstacles otherwise u could end up in a sticky situation if the following NPC is necessary to be close at all times or sumn

but otherwise yes that is a very simple way to get the job done

local human = script.Parent.Humanoid
local target = "insert target here"
While wait(.05) do
    human:MoveTo(target.HumanoidRootPart.Position)
end

Might cause a little server lag, if it does increase the wait time on the loop.