So i have a textbox inside a gui that has a number 1 inside it by default, i need to be able to use whatever number is in that textbox as a number value that i can compare and add or subtract from other numbers inside various scripts. Any ideas how i could do that?
✓ ANSWER ACCEPTED
How do i use a text from a textbox as a number value(when it's a number of course)?
1 answer
✓ Accepted answer
You can get the number as tonumber(TextBox.Text) if it's really just a number. If someone is allowed to type in something that's not a valid number (like their name) tonumber() will give you nil.
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
Wait, are you going to use RemoteEvents, if so you could easily fire it to the client or server and use the parameter of your number.
I will be using a remote event to transfer a few values from the client to the server and edit 2 of them in the server
So how exactly am i supposed to work with those number parameters, if you don't feel like explaining i'd be satisfied with the dev wiki article link too
I'm not entirely sure if I know what you mean but could you just add an actual numbervalue object with the same value and have the scripts call upon that?
That value is being changed by the player in that text box, i need to be able to use that, but it cannot recognize that number inside the textbox as a number, it thinks of it as a string value