Simple c# problem

My simplified script:

  public static float RegenaracjaMany = 0.1f;
  public static Text manaText;
  public static float mana = 50;
       
        void Start()
            {
            
                manaText.text = "Twoja Energia: " + mana.ToString();
            }
            void Update()
            {
                if (mana < 100)
                {
                    mana = mana + RegeneracjaMany;
                }
                
                manaText.text = "Twoja Energia: " + mana.ToString(); 
             }

problem: manaText showing only at start and after 1
frame this hide

What I do to make it working?

It’s probably the 0.1 it thinks it’s a double, but you have to specify it as a float like so

mana = mana + 0.1f;

Your mana & manatext variables probably shouldn’t be static by the way.