MoveTo() Not Going Where it Should

I have a code that makes rigs that I created move to a specific point.

		for i, v in pairs(game.Workspace.WorkMap.Soldiers.GunSoldiers:GetChildren()) do
			if v.Name == "Soldier" then
				v.HumanoidRootPart.CFrame = CFrame.new(v.HumanoidRootPart.Position.X, v.HumanoidRootPart.Position.Y + 2, v.HumanoidRootPart.Position.Z) --Makes sure rigs are not stuck in the ground
			end
			v.Humanoid:MoveTo(playerPositions.SoldierMove1.Position)
		end

The rigs start moving, but they end up only going halfway to where they should. It looks like they are getting stuck on parts and one another. What is the way to fix this? I have turned CanCollide off for all parts in their path, and for the rigs themselves.

Also, they don’t have any walking animations. This isn’t as important as the first part, but could someone direct me to a tutorial to load walking animations?

:MoveTo() will put the model on top of anything to prevent the model from going into another part, what you need to use is :SetPrimaryPartCFrame()

1 Like

I want it to look like the rigs are walking to the point. Will SetPrimaryPartCFrame() do the same thing?

1 Like

Oops my mistake, I read that wrong, I thought you wanted to teleport them. In your case you might have to use the PathFinder thing, unfortunately I do not know enough about that area to help you, but you can try looking for tutorials online.

How long is the move taking? There is an 8 second timeout so if the move takes longer than this the character will just stop where it is after 8 seconds.

This article has an example of how to get over the timeout problem

1 Like