So i was trying to post a Question but it only will say " Your title should be specific! Describe your problem concisely" Any was here is the script the for loop at line 12 never runs.
local PathfindingService = game:GetService("PathfindingService") local char = script.Parent local Humanoid = char.Humanoid while true do local path = PathfindingService:CreatePath() path:ComputeAsync(char.HumanoidRootPart.Position, Vector3.new(char.PrimaryPart.Position.X + math.random(-20,20),char.PrimaryPart.Position.Y + math.random(-20,20),char.PrimaryPart.Position.X + math.random(-20,20))) path.Blocked:Connect(function() path:ComputeAsync(char.HumanoidRootPart.Position, Vector3.new(char.PrimaryPart.Position.X + math.random(-20,20),char.PrimaryPart.Position.Y + math.random(-20,20),char.PrimaryPart.Position.X + math.random(-20,20))) end) local waypoints = path:GetWaypoints() print("Up to For loop") for I, waypoint in pairs(waypoints) do print("For loop") -- never gets printed in consale char.HumanoidRootPart:MoveTo(waypoint.Position) wait(0.1) end wait(1) end