Is it bad karma if you say something that turns out to be false?
No. When it comes to lying, bad karma is not related to the actual truthfulness of what was said.
Rather, it comes from intention. Speaking the untruth intentionally is bad karma and a violation of one of the five precepts. Please see this answer for more details.
From Nibbedhika Sutta:

Intention, I tell you, is kamma. Intending, one does kamma by way of
body, speech, &amp; intellect.

From Iti 25:

This was said by the Blessed One, said by the Arahant, so I have
heard: &quot;For the person who transgresses in one thing, I tell you,
there is no evil deed that is not to be done. Which one thing? This:
telling a deliberate lie.&quot;