Texture painting problem

Sometimes it works and it lets me texture paint and sometimes it doesn’t, I’m doing the same thing so I’m have no idea why sometimes it doesn’t work. What needs to be done in order for texture painting to always work?

Did you make sure you have an image assigned to your UV coords in the UV editor?