Humanoid:MoveTo() not working on Terrain

Hello,

My main objective is to move a NPC from one point to another. I have read many tutorials and believe I am doing everything correct. However, the NPC is NOT moving one little bit. The NPC is a RB6 model “Moving NPC” where I deleted the moving script underneath and instead put a new script that does the following:

local NPC = game.Workspace.MyNpc.Humanoid
while true do
wait(5)
	print("NPC be walking")  -- This section doesn't work
	NPC:MoveTo(game.Workspace.WalkTo1.Position)
	NPC.MoveToFinished:Wait();
	print("He done walking")
end

I have attached a very simple .rbxl file that demonstrates the issue. The part “WalkTo1” is a non-collidable part and everything is on a pretty flat terrain. The code above WILL work if the game is a simple flat Baseplate. However, once the terrain was added… the NPC will no longer walk.

Any help or suggestions of things to try is very much appreciated.

testMoveTo.rbxl (196.0 KB)

Thanks,
Smyrki

1 Like

OK, so after a day of trying random things… I solved the issue. So I’m going to post the answer here in case someone else runs into this issue. The problem was fixed by moving the RB6 model “up” in the Y-direction by just a teeny tiny about. I moved the NPC up by one whole stud, so when the game starts he technically falls down a tad, but no one will notice that.

I suspect there is a bug where when you try to place a RB6 model on a terrain surface that a few pixels of clipping occurs and their foot literally gets stuck in the terrain and they are unable to move. Hope this helps someone out and maybe a DEV will look into this.

Smyrki

3 Likes

this helped me as well , thank you. seems to be a bug to me…