so why didn't they build an ark
Interesting.
The point is that God would have killed them no matter what they tried. Even if they built an ark, they would have starved. They were doomed one way or another. Also, God may have communicated with Noah privately. As the saying goes: best way to hide an elephant is in plain sight. They may not even have believed Noah either.