How do I cycle through material slots?

I have an object with multiple material slots, and I want to make it to where you press a button to cycle through the different materials. Is there any way to achieve this with blueprint?

Here’s what I’ve tried so far, incrementing an integer value and setting that to be the material index. If anyone can point me in the right direction I’d really appreciate it.

If it does have more than one slot, you’re almost there, just connect this

But that will assign the same material to each slot.

Or do you mean, like having a cube, and every time I press E, the material changes? You only need one slot for that, but an array of materials