I’m trying to make a basic model move around like an NPC when using commands like humanoid:MoveTo and PathfindingService:CreatePath(). I tried applying the principles given in Roblox’s Moving NPCs Between Points tutorial page. My design is not working.
Here’s my very basic setup. To create the model that will move, I started with a basic part, colored blue, named PartA and grouped it alone into a Model named ModelA. PartA was set as the PrimaryPart of the Model. A Humanoid was added within the Model.
For the destination point I added a Model named GreenFlag. The Pole part of the is set as the PrimaryPart.
Finally I added a Script within the ModelA, telling ModelA to move to the GreenFlag.
Here’s the script:
-- Variables for the ModelA and its humanoid local modelA = game.Workspace.ModelA local humanoid = modelA.Humanoid -- Variable for the point the modelA should move to local greenFlag = game.Workspace.GreenFlag -- Move the modelA to the primary part of the green flag model humanoid:MoveTo(greenFlag.PrimaryPart.Position)
Here’s the game screenshot
The Model just sits there an makes no effort to move toward GreenFlag at all. I’m guessing that maybe the Model needs more than just Humanoid added to it to behave like an NPC and follow commands like humanoid:MoveTo . Can anyone point out what more is needed to make the Model behave and move like an NPC would?