Casting Actor to Interface

I have made an interface and an actor, the actor destroys itself and leaves an emitter on the ground, this part works fine. When I want to cast it to the interface I have made, it doesn’t work and it still says “Tablets: 0 / 10” where 0 is the number that is meant to change when you pick up the object.

I’m a little confused. Maybe you should read a tutorial about casting.

In picture 1, your cast will always fail, because im sure that you player character is not a Tablet_Prime class type. You are Setting the value of “Tablet_Prime Tablet” to the value of “Tablet_Prime Tablet”, that makes absolutely no sense.

Solution:
You replace the “Cast To Tablet_Prime” with "Cast To ThirdPersonCharacter in your WidgetBP. After that you drag the “As ThirdPersonCharacter” pin out, and search for “Get Tablets”
Now you’ve got the Player Character value inside your WidgetBP.

I’ve found a work around by adding a box collision to the actor and having a progress bar instead of numbers. It now works fine now.