|
how do i make the ai Walk to The Block named End without Hitting any walls using the path finding service i have tried many attempts on my own but have not worked so i created this model for some help thank you . LINK : http://www.roblox.com/AI-Need-help-item?id=363721947
CLOSEST ATTEMPT :
f = Instance.new("Model",game.Workspace)
f.Name = "Path"
while true do
path = game:GetService("PathfindingService"):ComputeRawPathAsync(game.Workspace.TheCoolOne1230.Torso.Position,game.Workspace.DevDeadly3652.Torso.Position,500)
points = path:GetPointCoordinates()
f:ClearAllChildren()
for plr = 0,#points do
game.Workspace.TheCoolOne1230.Humanoid:MoveTo(points[i])
end
for p = 1,#points do
part = Instance.new("Part",f)
part.Anchored = true
part.CanCollide = false
part.BrickColor = BrickColor.new("Really black")
part.Material = "Neon"
part.TopSurface = "Smooth"
part.BottomSurface = "Smooth"
part.Size = Vector3.new(1,1,1)
part.Position = points[p]
game.Workspace.TheCoolOne1230.Humanoid.WalkToPoint = points[p]
end
end |