Benjamin Franklin did not discover electricity when his kite was struck by lightning in 1752. In fact, electricity was already well known at the time. Instead, Franklin was trying to prove the electrical nature of lightning.
During a thunderstorm, as Franklin flew a silk kite with a metal key near the end of the string, he noticed the fibers on the line standing up as though charged. He touched the key and felt a charge from the accumulated electricity in the air, not from a lightning strike. This was enough evidence to prove his theory that lightning was electricity.
Had the kite been struck by lightning, Franklin would likely have been killed as was Professor Georg Wilhelm Richmann of St. Petersburg, Russia, when he attempted the same experiment a few months later.