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
1local pathservice = game:GetService("PathfindingService")
2local path= pathservice:ComputeSmoothPathAsync(game.Workspace.Start.Position,game.Workspace.End.Position,512)
3local coord=path:GetPointCoordinates()
4for i,v in pairs(coord) do
5game.Workspace.Robot.Humanoid:MoveTo(v)
6print(i)
7print("Moving to: ",v)
8game.Workspace.Robot.Humanoid.MoveToFinished:wait()
9end

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