Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

[SOLVED] MoveTo is not working for my NPC. What's wrong with this script or am I missing something?

I'm trying to get my NPC to go to a certain point, but it doesn't seem to work after hundreds of checks. However, this script does work for the Drooling Zombie that's popular in the Toolbox. Can't find anything on the internet about this problem. I also tried this on a basic R15 model. Any help is appreciated!

hum = script.Parent

hum:MoveTo(game.workspace.Model.PrimaryPart.Position)

1 answer

✓ Accepted answer

I think you have to also include the Pathfinding service and lead it down a route. I recommend you look at this Pathfinding Article

Also, I'm not sure about your script, maybe this will work or not.

hum:MoveTo(humRootPart.Position - game.Workspace.Partyouwanttomoveto) -- you cant do humanoid.Position because it has no position, the humrootpart does.

1 comment

0

Thanks for the quick help! Will do!

This discussion is preserved as it was. New answers, comments, and votes are closed.