Lyft has Wall Street abuzz, as shares of the country's second-largest ride-hailing service started trading Friday in an IPO that values the company at well over $20 billion.

But before the ride-sharing giant officially launched in 2012, not everyone was convinced the business was a good idea. In fact, co-founders Logan Green and John Zimmer received some less than encouraging words from one of the company's top investors.

"Our investor Sean Aggarwal has been probably the best mentor and adviser that we've had. But way back in 2011, he told us point-blank to work on something else," Zimmer told Inc. magazine in a 2016 interview. "He was like, 'You guys are a great team. I'm just not sure about this carpool thing.'"

Things look different in hindsight, and Aggarwal (a former executive at PayPal and Trulia) currently serves as the chairman of Lyft's board of directors. But Zimmer and Green have admitted that, at the time, it wasn't easy to ignore his skepticism.

"It was psychologically tough to not listen to him, because he was this person who had been giving us a ton of great advice. So you wonder: Is this good advice as well?" Green told Inc.

But even after thinking deeply about Aggarwal's advice to walk away from the carpooling concept, Zimmer and Green remained convinced that the transportation model in big cities was broken and that their company could offer a solution.

Growing up in Los Angeles, "being stuck in traffic, seeing one person per car," got them thinking, "We can make this more efficient," Green told CNBC's Andrew Ross Sorkin on "Squawk Box" on Friday. They realized "at any given time there's got to be dozens, if not hundreds, of people on the road sitting there, going to the same place. So, let's put them in the same car," Green said.