I am making a system that can have a number string that I can do math (+1) with and I want it to be changed into a text string so I can put it on a GUI. Is there a certain method or can I do math with a Text String?
You don't have to convert the number into a string to put in in a GUI, assuming that's all you're putting into that specific text field.
You can't, however, do math operations on a string. You have to convert the string into a number, first, using tonumber().
Tostring is the solution to your question. Here is the wiki page explaining this. http://wiki.roblox.com/index.php?title=Function_dump/Basic_functions#tostring I will quickly write out an example
1 | function add(a,b) |
2 | return tostring ( "The answer to " ..a.. " + " ..b.. " is " ..a + b) |
3 | end |
4 |
5 | print (add( 5 , 5 )) |
6 |
7 | -- output: 10 |
Oops, I misread the question - I got it the wrong way round. ToNumber is the solution you need.