local npc = script.Parent local humanoid = script.Parent.Humanoid local animation = script.Parent.Animation local nodes = {workspace.NpcNodes.Node,workspace.NpcNodes.Node.Node,workspace.NpcNodes.Node.Node.Node} wait(3) -- to load in local animationtrack = humanoid.Animator:LoadAnimation(animation) animationtrack:Play() if animationtrack.IsPlaying then npc.Potion["blue goo"]:Destroy() end humanoid.MaxHealth = 100000 humanoid.Health = humanoid.MaxHealth humanoid.WalkSpeed = 100 game:GetService("ReplicatedStorage").chargeUp.Parent = npc.HumanoidRootPart for i=1,3,1 do humanoid:MoveTo(nodes[i].Position) end
In the for loop How do i wait until the humanoid is done moving to the part?
--in the loop repeat until humanoid.Parent.HumanoidRootPart.Position = nodes[i].Position end