How can i fix a skill which uses 20 mana and works fine until the very last 20 mana remaining which then it skips the attack ?

no i dont use gas system. My stats are on a component self made stuff from tutorials acctually. And everything works except this one all the stats like xp health points and so on work flawlessly so far