Npcs not moving when using (:MoveTo)

Hi everyone, Im having problems making npcs move and walk around using the :MoveTo function in the humanoid. The script I used worked perfectly on the default R15 dummies in studio. The problems arise when using newer avartars like my own.

I was wondering if I am just being stupid or if there is another way of making these characters move.

The fact is that I don’t belive that the code is the problem since the position is appearing in the walkToPoint property.

Here is the code.

local xmin = 50
local zmin = -70
local xmax = 100
local zmax = 40

local character = script.Parent.Parent
local humanoidRootPart = character:WaitForChild('HumanoidRootPart')
local humanoid = character:WaitForChild('Humanoid')

while wait(3) do
	character.Humanoid:MoveTo(Vector3.new(math.random(xmin,xmax), 0, math.random(zmin,zmax)))
end

Thank you for your time.

Try this:

humanoidRootPart.Anchored = false

:man_facepalming: Thank you a lot. Damm, I wasted an Hour. :upside_down_face:

1 Like