So I am developing a NPC with AI making so that it walks according to the placement of bricks but when it gets to a certain point. How would I make a "line" where the NPC could detect if there is another NPC infront of it or touching a brick infront of it so it forms an orderly line? Below is my current AI script:
order = game.Workspace.FoodTruck1.Order.Position script.Parent.WalkToPoint = game.Workspace.Walk1.Position wait() script.Parent.WalkToPoint = game.Workspace.Walk2.Position wait(5) script.Parent.WalkToPoint = game.Workspace.Test1.Position wait(5.5) script.Parent.WalkToPoint = order wait (80) --In case no one takes the order of the NPC, it will leave script.Parent.WalkToPoint = game.Workspace.leave.Position script.Parent.Parent.Head.Dialog:Destroy() wait(5) script.Parent.Parent:Destroy()