How can i set material parameters from a hud blueprint?

Hi,

i was trying to make a refillable boostbar in a hud blueprint,

I have build a material which lerps between two colors and the alpha channel is hooked up to a scalar parameter.
I was creating a dynamic material instance and a dynamic material object in the construction script.
And i want to set the scalar parameter of the material in the event graph of the hud blueprint dynamicaly.

After compiling and starting the game in the viewport,nothing happend.
I have attached pictures of the material, construction script and event graph of the hud blueprint.

What did i do wrong? I also noticed that i could place the “set scalar parameter” in the event graph of the hud blueprint only after unselecting the “contextsensitiv” checkbox .