Can Humanoid:Move be used for npc?

I am testing ideas right now and i want to make an npc move forwards by using Humanoid:Move. After reading this:Humanoid | Roblox Creator Documentation, I learned that Move: will make the character be moved relatively to the players camera. But i am confused. An npc does not have a camera. Can I change parameters of this function so it works for npc characters? If so, how? if not, how can I use the moveTo function to move the npc in a direction, not a point?

1 Like

Use Humanoid:MoveTo, it’ll work for NPCs

how do I use MoveTo to make the Humanoid just go in the direction I want it to go in?

Yeah it will work, as long as the NPC has a humanoid

1 Like

like this:

Humanoid:MoveTo(Vector3.new(50, 50, 50))
-- this will make the npc walk to position 50, 50, 50

MoveTo and Move are different. Move takes a direction while MoveTo takes a position. If you want to make it move forwards, you would have to do something like that

local npc = workspace.NPC
npc.Humanoid:Move(npc.PrimaryPart.CFrame.LookVector)

yes a direction, not a position. Let me test this out.

1 Like

Yea I know

Alright, I assumed you wanted the humanoid to move to a certain position by like CFrame.LookVector * 2

no but thank you. Also thank you @Jxl_s it seems to work.