Hello, so basically, the NPC should go to “CASHIER” position , but for some reason is heading to the door.
Code:
local function createNpc()
local NPCTemplate = RepStorage.NPC.NPC:Clone()
local Template = {Model = NPCTemplate,PersonaAtendiendo = nil,Order = createOrder()}
local Humanoid = NPCTemplate:WaitForChild("Humanoid")
local x = PFS:CreatePath()
NPCTemplate.Parent = workspace.Programming.Restaurant.NPC
NPCTemplate:MoveTo(workspace.Programming.Restaurant.Entry.Position)
x:ComputeAsync(NPCTemplate.Torso.Position,workspace.Programming.Restaurant.Cashier.Position)
local wp = x:GetWaypoints()
coroutine.wrap(function()
for i,v in pairs(wp) do
Humanoid:Move(v.Position)
Humanoid.MoveToFinished:Wait()
end
end)()
end
Thanks for reply!
I think you might be wrong, I am teleporting the model!
Models have a function :MoveTo(), I used it to teleport the NPC to restaurant door!
That’s not the trouble