Success requires luck and doing, action. The odds are strongly against you in most all cases, even with some luck. In the equation of success, those two things cannot be separated, they are bound together in all cases.
Not doing, not taking action, guarantees you will not succeed, you will simply never start at all. Luck will have no role in that for you have already reduced the possibilities to none other than no success / no attempt.
The more cynical view can be summed up as saying that because luck is a requirement, effort is mostly futile because you can't control everything. It's a personal mindset projection (someone is telling you their bias, giving you insight into their experience, their fears, etc), rather than any kind of useful insight into how you can or can't create something successfully.
It does, however, make it a lot more likely.
Conversely: Not working hard makes failure a near certainty.