Set editable Variable in WIdget

Hello everybody,
I fighting with a problem since some hours =)
I have a MyCharacter BP where I call a Widget (Ingame Menu). I also have an Integer Variabel called testvar which is set to zero as default.
Within the Widget BP I have a button called Resume. If I click on it the game will unpaused and set editable Variable will be set to 100.
Not I throw out the testvar as a string on screen but it is still zero =(
I Attached a picture from my Widget BP maybe someone cann tell me where I go wrong.

Is MyCharacter your player controller? If not, the cast is probably failing, either store the value in your player controller BP instead and cast to that, or, Get Player Character instead and cast to MyCharacter.

Function Library

MyCharacter Instance is an object reference to MyCharacter BP where I handle the player movement. I tried lot of things but it dont work.
Now I go a different way and try to communicate between this two BP. Normally this works for example with level BP and HUD BP but in this case …
First I set up a BP Function Library and make there a function called Menu. For the inputs I set up the bool menu on and the int testvar.
Now I tried this (see picture) but even this didnt work.

But you’re casting from Player controller, try Get Player Character and cast from that?