Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
rabbi99 714 Moderation Voter
4 years ago
Edited 4 years ago

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

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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.

0
Thanks for the quick help! Will do! rabbi99 714 — 4y
Ad

Answer this question