I think the Gemera in Senhedrin 108 (that Rashi quotes) is key to answer why Noach building the ark would make them do teshuva. The Gemera records the conversation that happened between Noach and those people in his generation when they saw him build the ark:
דרש רבא מאי דכתיב (איוב יב, ה) לפיד בוז לעשתות שאנן נכון למועדי רגל מלמד שהיה נח הצדיק מוכיח אותם ואמר להם דברים שהם קשים כלפידים והיו (בוזים) [מבזין] אותו אמרו לו זקן תיבה זו למה אמר להם הקב"ה מביא עליכם את המבול אמרו מבול של מה אם מבול של אש יש לנו דבר אחר ועליתה שמה ואם של מים הוא מביא אם מן הארץ הוא מביא יש לנו עששיות של ברזל שאנו מחפין בהם את הארץ ואם מן השמים הוא מביא יש לנו דבר ועקב שמו ואמרי לה עקש שמו
"Rava taught: What is the meaning of that which is written: “A contemptible torch [lapid] in the thought of him that is at ease, a thing ready for them whose foot slips” (Iyov 12:5)? This teaches that Noah the righteous would rebuke the people of his generation, and he said to them statements that are harsh as torches [kelapidim], and they would treat him with contempt. They said to him: Old man, why are you building this ark? Noah said to them: Hashem is bringing a flood upon you. They said to him: A flood of what? If it is a flood of fire, we have another item and it is called alita, and it is fireproof. And if it is a flood of water that He brings, if He brings the water from the earth, we have iron plates with which we can plate the earth to prevent the water from rising. And if He brings the water from the heavens, we have an item and it is called ekev, and some say it is called ikkesh, which will absorb the water."
In other words, people did listen to what Noach was saying and knew that Noach knew something they did not. Noach was not just saying "stuff." A proof that they knew a flood was coming is brought down by the Siftei Chachmim and Maskil Le'David both quoting the Nachalat Yaakov on Beresheit 6:14:
They ask: Wouldn't the construction of the ark have had the opposite effect, potentially discouraging people from doing teshuvah? They could have argued to Noach, "If the ark is truly meant to save you from the Flood, this doesn't make sense. God has many ways to save you without an ark!" The answer is that they were aware a flood would come (they knew Noach was on to something, similar to the Gemara in Senhedrin 108b), as Rashi explains in the story of Lemech's wives (Bereshit 4:24 see there). However, they believed it would occur in the distant future. Noach building the ark signaled that the flood was coming very soon, thus encouraging them to repent.
However, they chose to not build an ark because they claimed that they were ready for any situation, and did not need to spend so long building an ark. They said that if it is a flood of fire they have an item called an "alita" which is fireproof and if it is water, whether it comes from the earth or from the heavens they have tools to defend themselves. When Noach told them the water would come between their feet, they didn't believe him (maybe because of arrogance, etc). They still maybe thought that they can defend themselves without an ark and maybe that is why they ended the conversation with Noach.