Component working in Widget, but not Blueprint

When it says “Accessed None trying to read property” it means you tried to read something from an object that doesn’t exist.

Do you correctly set the variable inventory?

Hey.
I am trying to use a function from my component. Even though I have set the component to visible in my blueprint, it still says “Accessed None trying to read property”. I am running the same function from my component in an interface widget. Does anyone know why it only works one place when I have done the same?

Image of my blueprint using the toggle inventory function and the component.

Image of the widget where it works.

Image of the component function I’m trying to use in the blueprint.