Blueprint for toggle material not working

I fixed it. The problem was in the material. In the Content Browser, open the material and in the Details, under “Usage” I checked the box “Used with skeletal mesh”. I tried this with different materials, and the blueprint for toggle material works only with the materials that have this box checked.