My following comments are in 100% support of gun ownership and concealed carry; but let's just be realistic.
These truck attacks are tragic around the world, absolutely.
But let's have some perspective - the odds of a vehicle attack like Nice or elsewhere are 0.000000000000000000001%. It's happened only a few times in the news around the world in the last year. Think about every street, every gathering, every city, every vehicle...
The real advice is to simply not stand on crowded city streets making yourself vulnerable to such attacks. That's the easiest "self defense" approach to take.
As for shooting at such vehicles, get out of the way instead. If you're standing to the side of it, you're not even going to have time to draw and fire safely before it passes. Watch this video in Nice of the truck attack.
https://www.youtube.com/watch?v=eCrhXArKE24If you were in a safe location (not in danger of being run over), and you had instant awareness that it was an attack (unlikely, but possible), you might be able to draw your weapon in time to watch it drive by and run people over. At that point, running around with a gun has a high chance of YOU being shot as a terrorist.
You also have no idea how complex the attack is. If I saw a vehicle attack, I'm running the other way. There can be an IED (a favorite of these Jihadists), or a secondary complex attack of gunfire or explosions (like in Paris). Google IED videos and watch some of those to see the radius of the detonation. Also, avoid fatal funnels and don't run where the rest of the crowds are running, since complex attacks will draw fish into a barrel, so to speak. These attacks are designed to be rapid, coordinated, and unpredictably violent. There's also going to be a lot of police and military response shooting anyone waving a gun around. Get away from it. FAST.
This isn't like a random act of violence, robbery, etc. where you can defend yourself better.
Now, having said that, if armed folks were on the rooftop during the Charlie Hesbo attacks, they could have put suppressing or effective fire on those AK armed terrorists. But as for truck attacks, it's not going to happen, and just exercise better situational awareness and if it does, get away!