The Infinite Tsukuyomi does not affect Hashirama, Tobirama, Hiruzen and Minato because they are reanimated. Hagoromo, the Sage of the Six Paths, appears and explains to the four that Hashirama and Madara are the reincarnations of his sons Ashura and Indra. Hagoromo recounts the tale of how he founded Ninshu, the Ninja Creed, and about the lives of Ashura and Indra.
I hope you learn
what true strength is…
...آمل أن تتعلّموا ما هي القوّة الحقيقية
Lernt, was wahre Stärke ist.
Sabrán lo que es el auténtico poder.
Sabréis lo que es el auténtico poder.
Spero che imparerete 
cosa sia davvero la forza,
Espero que aprendam 
o que a força real é...