Im making npcs walk using :MoveTo but it keeps repeating same position from the first time, any help?
cooldown = false function sit(v) wait() local seat = game.Workspace:WaitForChild(v:WaitForChild("SeatPart").Value) seat:Sit(v:WaitForChild("Humanoid")) wait(5) cooldown = false end while wait() do local number = math.random(1, 2) if number == 1 then local v = game.ReplicatedStorage:FindFirstChild("FoodNPCS"):FindFirstChild("FoodNPCL") if cooldown == false then cooldown = true v.Parent = game.Workspace local position = Vector3.new(game.Workspace:WaitForChild(v:WaitForChild("SeatPart").Value).Position) print(game.Workspace:WaitForChild(v:WaitForChild("SeatPart").Value).Position) local humanoid = v:WaitForChild("Humanoid") --parented to character humanoid.WalkToPart = nil -- Work around here! humanoid:MoveTo(position) --call MoveTo() on humanoid humanoid.MoveToFinished:Connect(function(reached) sit(v) end) else if number == 2 then local v = game.ReplicatedStorage:FindFirstChild("FoodNPCS"):FindFirstChild("FoodNPCR") if cooldown == false then cooldown = true v.Parent = game.Workspace local position = Vector3.new(game.Workspace:WaitForChild(v:WaitForChild("SeatPart").Value).Position) local humanoid = v:WaitForChild("Humanoid") --parented to character humanoid:MoveTo(position) --call MoveTo() on humanoid humanoid.MoveToFinished:Connect(function(reached) sit(v) end) end end end end end