Humanoid would not rotate when moved to part

To put this briefly, my humanoid would not rotate when I tried to call MoveTo() function on it. I’ve never seen this happen before when I used it.

A video:

My Script:

while wait(1) do
	local e = game.Workspace:GetChildren()
	local saba = false
	for i, v in pairs(e) do
		if v.Name=="food" then
			if (v.Position - script.Parent.UpperTorso.Position).magnitude<=13 then
				script.Parent.Humanoid:MoveTo(Vector3.new(v.Position.X,script.Parent.HumanoidRootPart.Position.Y,v.Position.Z))
				saba = true
			end
		end
	end
	if saba==false then
		script.Parent.Humanoid:MoveTo(Vector3.new(math.random(script.Parent.HumanoidRootPart.Position.X-script.Parent.Part.Size.Y/2,script.Parent.HumanoidRootPart.Position.X+script.Parent.Part.Size.Y/2),script.Parent.HumanoidRootPart.Position.Y,math.random(script.Parent.HumanoidRootPart.Position.Z-script.Parent.Part.Size.Z/2,script.Parent.HumanoidRootPart.Position.Z+script.Parent.Part.Size.Z/2)))
	end
end
2 Likes

Your humanoid ? I don’t think humanoid is a physical thing are you talking about the npc/player, the human doesn’t have a position or rotation. Correct me if im wrong. I didn’t search the error in the script I’m just asking, Also do you get any error message ?

Please reread what I said and watch the video. The humanoid/dummy will move, but it does not rotate based on the movement. Other instances where I have tried this the humanoid/dummy will move and rotate to the desired part.

I thought you were talking about an actual humanoid, anyways why would you’re humanoid rotate the
move to function implies it ? Humanoid | Documentation - Roblox Creator Hub

In the wiki, it shows the humanoid rotating when it is moving to the moving part. In mine, it doesn’t.

The humanoid’s parent which is most likely a model has a root part right ? is it facing in the wrong direction ?

Nevermind. I figured out the real nuance here. The problem was that the big red cylinder attached to the body was not set to massless, causing this phenomenon.

1 Like