it keeps giving me path request is too long, there are no walls in between me and the end goal, its just a baseplate but still keeps giving me that.
script:
local PathFindingService = game:GetService("PathfindingService")
local human = script.Parent:WaitForChild("Humanoid")
local torso = script.Parent:WaitForChild("HumanoidRootPart")
local path = PathFindingService:CreatePath()
path:ComputeAsync(torso.Position, game.Workspace.EndingPart.Position)
local Waypoints = path:GetWaypoints()
path.Blocked:Connect(function()
end)
for i, Waypoint in pairs(Waypoints) do
local part = Instance.new("Part",workspace)
part.Shape = "Ball"
part.Material = "Neon"
part.Size = Vector3.new(0.6, 0.6, 0.6)
part.Position = Waypoint.Position + Vector3.new(0, 2, 0)
part.Anchored = true
part.CanCollide = false
if Waypoint.Action == Enum.PathWaypointAction.Jump then
human.Jump = true
end
human:MoveTo(Waypoint.Position)
human.MoveToFinished:Wait()
end
even just changing the end goal to 100 studs infront results the same thing
local PathFindingService = game:GetService("PathfindingService")
local human = script.Parent:WaitForChild("Humanoid")
local torso = script.Parent:WaitForChild("HumanoidRootPart")
local path = PathFindingService:CreatePath()
path:ComputeAsync(torso.Position, torso.Position + Vector3.new(100,0,0))
local Waypoints = path:GetWaypoints()
path.Blocked:Connect(function()
end)
for i, Waypoint in pairs(Waypoints) do
local part = Instance.new("Part",workspace)
part.Shape = "Ball"
part.Material = "Neon"
part.Size = Vector3.new(0.6, 0.6, 0.6)
part.Position = Waypoint.Position + Vector3.new(0, 2, 0)
part.Anchored = true
part.CanCollide = false
if Waypoint.Action == Enum.PathWaypointAction.Jump then
human.Jump = true
end
human:MoveTo(Waypoint.Position)
human.MoveToFinished:Wait()
end