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

[FIXED] MoveTo() - what do i miss here??

Asked by 9 years ago

a Newbie Q:

The following code runs without any errors however the "SecretAgent" doesn't walk towards the "Part" object (it stays at the same place):

print("Start")
wait(2)
pos = game.Workspace.Part.Position
game.Workspace.SecretAgent.Humanoid:MoveTo(Vector3.new(10,0,100), game.Workspace.Part)
print("End")

and this also does nothing:

print("Start")
wait(2)
game.Workspace.SecretAgent.Humanoid:MoveTo(game.Workspace.Part.Position, game.Workspace.Part)
print("End")

if i remove the Humanoid then "SecretAgent"moves there immediately teloporting instead of walking there..

print("Start")
wait(2)
game.Workspace.SecretAgent:MoveTo(game.Workspace.Part.Position, game.Workspace.Part)
print("End")

Any thoughts? this drives me mad :)

Thank you all in advance!

EDIT: OK! found the problem, the NPC i had used didnt support Humanoidone i've used a different NPC all works.

0
Make sure that A) Part of the NPC is anchored, or B) Part of it is stuck to the ground due to inlets on some part of the body. Perci1 4988 — 9y

Answer this question