I'm trying to currently generate a number between 8-18 in a text box, but I'm at a loss how to do it. I managed to kind of (?) do it, but the text box displays numbers inconsistently. Sometimes when I press the button, a number is generated, and sometimes when I press the button, the text is completely empty. I don't get what I'm doing wrong.
This is for generating a character DnD-style, if anyone has any tips for that sort of thing.