Car electrical issues?

I have a 2001 Ford F-150 crewcab. The truck died while I was driving and the dash lights went crazy the speedometer went nuts the doors lock and unlock on their own. So I don't know if a dead battery is just causing the system to go nuts. Or maybe a bad ground someone. Any help would be great thank you.

Bbb

You're right about thinking of loose or corroded Grounds. They will cause all sorts of electrical Gremlins. Also loose Power Feed wires. But Ford has similar problems with their IPDMs, BCMs for other brands. And they will cause similar problems. But I would check the engine compartment Grounds and Power Feed to the Fuse/Relay box first. Any ground wires near the Battery are highly suspect. If you have a lot of miles the Ignition Switch is also suspect. Not the lock cylinder where the key goes in, the electrical switch.

If the battery is dead charge it.

Probably a low battery due to a failed alternator.