Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does my robot (Pathfinding) Try to walk through walls?

Asked by 7 years ago
Edited 7 years ago
local pathservice = game:GetService("PathfindingService")
local path= pathservice:ComputeSmoothPathAsync(game.Workspace.Start.Position,game.Workspace.End.Position,512)
local coord=path:GetPointCoordinates()
for i,v in pairs(coord) do
game.Workspace.Robot.Humanoid:MoveTo(v)
print(i)
print("Moving to: ",v)
game.Workspace.Robot.Humanoid.MoveToFinished:wait()
end

The walls are can collide. Everything on the player is can collide. Please help.

LINK TO PLACE: Place

0
From what I can see, is that you're not telling the bot to go around the wall. It doesn't know there's a wall there, and it doesn't know how to go around it. Hopefully this will pinpoint you in the right direction. minikitkat 687 — 7y
0
How do i tell it to go around the wall? Void_Frost 571 — 7y
0
It's supposed to know that there's a wall there. That's the whole point of 'ComputeSmoothPathAsync'. I remember having a similar problem when my walls were too small. Not sure if it's the same issue for you, though. saenae 318 — 7y

Answer this question