So, I’ve been trying to make a script where a rig moves towards 2 certain blocks. (1 after the other.) the problem is, the script I have made does not work whatsoever.
I have anchored the humrootpart so the character can’t be pushed around.
The script just activates when you join for now.
local p1 = game.Workspace.NPCMovePoints.MovePoint1
local p2 = game.Workspace.NPCMovePoints.MovePoint2
local walk = script.Parent.Humanoid.Animator:LoadAnimation(script.Parent.Animations.run)
walk:Play()
script.Parent.Humanoid:MoveTo(p1.Position)
script.Parent.Humanoid.MoveToFinished:Wait()
walk:Stop()
wait(3)
walk:Play()
script.Parent.Humanoid:MoveTo(p1.Position)
script.Parent.Humanoid.MoveToFinished:Wait()
walk:Stop()
local p1 = game.Workspace.NPCMovePoints.MovePoint1
local p2 = game.Workspace.NPCMovePoints.MovePoint2
local humanoid = script.Parent.Humanoid
local walk = humanoid.Animator:LoadAnimation(script.Parent.Animations.run)
walk:Play()
humanoid:MoveTo(p1.Position)
humanoid.MoveToFinished:Wait()
walk:Stop()
wait(3)
walk:Play()
humanoid:MoveTo(p2.Position)
humanoid.MoveToFinished:Wait()
walk:Stop()
Oh, yeah, I mistyped the code. The second move point was supposed to be MovePoint2. But the problem still is that it won’t move at all. Not even to the first spot.