Hello, I have a text box where you can donate points to your team. And obviously, the game will break if you donate a string to an int value. So, how can I make it possible to only be able to write numbers in the text box?
Please don't take this question down, I have looked everything up, and this is my last resort,
BTW THIS IS NOT A REQUEST, I JUST WANT TO KNOW WHAT STRING MANIPULATION I NEED TO USE AND HOW I USE IT!
Thank you.

6 comments
You should also mention to number returns nil if it cannot concert its arguments to a number. Good answer nonetheless
convert*
This is definitely the more ideal solution, I kind of jumped on string manipulation since he mentioned it. OP use this instead.
But what if I dont want to allow negative numbers either??
Should I just use: if newValue < 0 then...
Well, I think you would want newValue >= 0 but yeah that’s the way to do it