Hi there! So I’m currently working on a pathfinding script, something similar to operators demo by Cishshato. And there’s a problem. I’m tweening the primary part of the NPC after the :MoveTo() is finished. However, it just ignores the fact that there’s a MoveToFinished and just teleports it after the moveto began. Without the tween, it works fine. Any ideas why?
print("walking to waypoint "..num)
movingTo = waypoint.Position
humanoid:MoveTo(movingTo)
local reached = humanoid.MoveToFinished:Wait()
if not reached then humanoid:MoveTo(movingTo) end
print("finished walking to waypoint "..num)
local tween = game:GetService("TweenService"):Create(startPart, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Orientation = waypoint.Orientation})
tween:Play()
(startpart = primarypart btw)