What function would detect something I answer back to a NPC. For example, if I said no to it, how would I detect that I said no to it and be able to run a script that caused the NPC to walk to a point. Below is my current script:
while true do order = game.Workspace.FoodTruck1.Order.Position script.Parent.WalkToPoint = order wait () end
In order to detect what they choose you would use the DialogChoiceSelected event. For example:
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) if choice == script.Parent.DialogChoice.ChoiceA then --Does the thing you want end elseif choice == dialog.DialogChoice.ChoiceB then --Does the other thing end end end)
Good Luck!