NPC not animating or moving

Hello! I have a script that makes my NPC move to a specified point, however it isn’t doing anything, nor is it animating.

It’s a very simple script. It is in a player’s GUI as a ViewportFrame, not really sure where to go from here. Would replicating it from the client into the player’s GUI work?

Here’s the script:

wait(1)

script.Parent[""].Humanoid.WalkToPoint = Vector3.new(221, -12.844, -76.802)

For the moving NPC would be this script using MoveTo instead of WalkToPoint.

wait(1)

script.Parent[""].Humanoid:MoveTo(game.Workspace.Part.Position) -- Location here
script.Parent[""].Humanoid.MoveToFinished:Wait()

The animating NPC would be the animation track thing.

local NPC = script.Parent[""]

local Animation = script.Parent.Animation --- Any animation would work.

local animationtrack = npc.Humanoid:LoadAnimation(animation)

animationtrack:play()
1 Like

Isn’t :MoveTo() instant? Also, it’s a bit inefficient considering there is a jump in the middle.

I’m not really sure but there is more in this.

1 Like

Yeah, no success on the moveto thing.

I add more the move to thing since you need a part.position.

1 Like

No success. (30 charssssssssss)

I have a test script on ServerScriptService with an NPC in the workspace.

wait(1)

game.Workspace["Dummy"].Humanoid:MoveTo(game.Workspace.Part.Position) -- Location here
game.Workspace["Dummy"].Humanoid.MoveToFinished:Wait()

It isn’t in the workspace, it’s in the player’s GUI. I think that’s the issue.