So i tried to use pathfinding service to make a rig get to the end position just for fun and for some reason its skipping all the waypoints and going straight to the end
Video:
After this it looks like the only way to fix this was to add a wait function since the MoveTo() function was updating so fast it made it seem like it just skipped to the end
local PathFindingService = game:GetService("PathfindingService")
local Rig = workspace.Rigs.AnimationRig
local Humanoid = Rig.Humanoid
local Torso = Rig.UpperTorso
local Path = PathFindingService:CreatePath()
Path:ComputeAsync(Torso.Position, game.Workspace.EndPart.Position)
local Waypoints = Path:GetWaypoints()
for i, waypoint in pairs(Waypoints) do
local Part = Instance.new("Part")
Part.Anchored = true
Part.Material = "Neon"
Part.Parent = workspace
Part.CanCollide = false
Part.Position = waypoint.Position
Part.Size = Vector3.new(1,1,1)
Part.Shape = Enum.PartType.Ball
Humanoid:MoveTo(waypoint.Position)
end
is there any fix except adding a wait function?