Genesis 7 When the ark was ready, God told Noah the flood would be coming in 7 days’ time. Noah, his three sons and their wives were told to take their possessions aboard. They stored food for the animals coming aboard too.
Of all the people, only Noah's family was saved Noah warned the people that God's judgment was coming. It took hundreds of years to build the Ark, and everybody knew why Noah was doing it. But nobody believed him until it was too late.