The Character stops moves and stops again for some reason. Here is the code:
local path = pathfinding:CreatePath()
path:ComputeAsync(Body.Position,Dest)
local WayPoints = path:GetWaypoints()
for k, waypoint in pairs(WayPoints) do
hum:MoveTo(waypoint.Position)
if waypoint.Action == Enum.PathWaypointAction.Jump then
hum:ChangeState(Enum.HumanoidStateType.Jumping)
end
hum.MoveToFinished:Wait(2) -- make this wait() maybe?
end
I tried changing hum.MoveToFinished:Wait(2) to hum.MoveToFinished:Wait() it didn’t help.