It says in Megillah Daf 13 or 14 that at a certain stage Nevuah stopped and at a certain stage Ruach Hakodesh stopped.
We also learnt in todays Daf (Yoma 39) that Hash-m doesn't kill a Tzaddik unless he creates another Tzaddik like him. So if Hash-m will kill for example Moshe Rabbainu he'll ake a Tzaddik like him. So shouldn't that mean that in every generation you have got Tzadikim like in the generation of Moshe Rabbainu. So why did Ruach Hakodesh stop if you've got a Tzaddik like Moshe Rubbainu in every genration?
The way that Hash-m communicates with the generation does not depend exclusively upon the spiritual level of the person with whom He communicates. It also depends upon the merit of the generation in general. For example, see Berachos 34a, where Hash-m tells Moshe that He only gave Moshe renown in the merit of the Bnei Yisrael. See also Sotah 48b, "A Bas Kol announced 'there is one among you who is worthy that the Shechinah should rest upon him, but the generation is not worthy of it.'" Similar statements can be found in Berachos 57a, Moed Katan 25a, etc.