In a recent Instagram post that has generated more than five million views, Dwayne “The Rock” Johnson recorded a short video to tell a little known story from one his early career setbacks.

Standing on a balcony overlooking the city of Vancouver, Johnson spoke of the time he got cut from the Canadian Football League just two days after playing in his first professional game. Johnson returned home to live with his parents in Florida. He had all of $7 in his wallet.

Getting cut was a major mental setback for the then 22-year-old Johnson, who had spent the previous ten years dreaming of a professional football career. He suffered an injury in his senior year at the University of Miami, which crushed his hope to play in the NFL.

Some of his teammates, like defensive tackle Warren Sapp, went on to sign multi-million dollar NFL contracts. Johnson had to travel to Canada to keep any hope of a professional career alive.

Johnson said he was depressed, watched a lot of of TV, and sulked on the couch for two weeks. But then, something clicked. Johnson’s moment of decision should inspire entrepreneurs who–by definition–will face setbacks and failures.

His NFL dream might have been “shattered,” but it was time to replace one dream with another. “You gotta have faith that the one thing you wanted to happen oftentimes is the best thing that never happened,” Johnson told his 90 million Instagram followers.

In another video, Johnson said he looks back at the “7 bucks moment” as a turning point in his life. “The world was going to hear from me,” he decided. “I didn’t know how and when, but I started training again.” Instead of focusing on a football career, he pursued another passion to become a professional wrestler.

Johnson has what Stanford psychology professor Carol Dweck calls a “growth mindset.” Dweck’s research has found that the beliefs we hold about ourselves are a great indicator of future success. According to Dweck, “Some people believe you have a certain amount of talent and ability and that’s it–we call this a fixed mindset–and it makes us afraid to take on challenges and to persist in the face of setbacks or criticism.” Other people have the confidence to take on new challenges and “undaunted by setbacks and negative feedback.”

The good news is that Dweck believes we can become more resilient to setbacks and build a growth mindset. The secret is to change the story we tell ourselves. Dweck says when we’re facing a new challenge, one of our inner voices might be saying, Don’t go there or you’ll fail again. Instead, think about what you might learn from the new challenge even if you don’t succeed. See the challenge as exciting rather than threatening.

Dweck developed her theory over 30 years ago when she discovered that some students were devastated by small setbacks while others rebounded. She connected the success of the resilient students not to the effort they put into studying, but to the way they thought about their setbacks.

Those students who believed they could do better put in more time and effort, which lead to higher achievement. But it all starts with how we think about our setbacks. Some people see setbacks as permanent–fixed–while others see it as an opportunity for growth and renewal.

Johnson has said the low point–the $7 moment–motivated him “to do more.” We’ve all had $7 moments and we’ll have them again. In those times it might be wise to take some advice from a failed football player turned world famous actor: “Sometimes you’re going to get you’re a** kicked. You’ve got to get up and have faith. Years later we look back and realize, it’s the best thing that never happened.”

That’s a growth mindset.