I want the humanoid to move to a player's position but not directly on top of it. I want it to stop right before reaching the position. How do I accomplish this?
✓ ANSWER ACCEPTED
How do I make a humanoid move to a part without stepping on it?
1 answer
✓ Accepted answer
repeat
wait(1)
npc.Humanoid:MoveTo(Character.HumanoidRootPart.Position)
if (npc.HumanoidRootPart.Position - Character.HumanoidRootPart.Position).Magnitude <= 5 then
break
end
until (npc.HumanoidRootPart.Position - Character.HumanoidRootPart.Position).Magnitude <= 5
This discussion is preserved as it was. New answers, comments, and votes are closed.
