local pathfindingService = game:GetService("PathfindingService")
function makePath(target)
local path = pathfindingService:CreatePath()
path:ComputeAsync(script.Parent.HumanoidRootPart.Position, target)
local waypoints = path:GetWaypoints()
for _, way in pairs(waypoints) do
script.Parent.Humanoid:MoveTo(way.Position)
script.Parent.Humanoid.MoveToFinished:Wait()
end
end
makePath(workspace.part1)
makePath(workspace.part2)
makePath(workspace.part3)
makePath(workspace.part4)
It breaks because i have a random maze generator, when the maze is generated, a character spawns, and follows the players, but, it sometimes break, and sometimes walk then stop.
no thats it, but the character is big, and it breaks when moving, i wanted to use another method than pathfinding service, or an advanced way in it, if you want, i can give you the roblox place file to see yourself.
" IM USING ANOTHER PLACE WITH A RANDOM SMALL MAZE "