How to add mask to hud progress bar widget?

Hello, i’m working o a game hud, my health bar is a like a sword and the health is filled in the middle of the sword with a texture, my problem is that i can’t (i don’t know why) add a mask, like i used to use in photoshop, to avoid the square at the end of the sword. you can see the problem in the attached picture.

is there a way to use a mask to let the progress bar fill the empty sword and remove the square at the end ?

thanks in advance for all the help.