My teacher also said this to me once, I never forgot that and always doubted my capacities.
Sometimes just one bad opinion lets us down no matter if we've already received a hundred compliments. One is enough.
However, I now know she just said that because she didn't like me. Thankfully, I was able to let that go.
We should never lose hope. Instead, we should always do want we want.