Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i use the function tostring to convert number to string?

The wiki just doesn't explain enough for me to understand.

Because of this i'm only using this alternative to make my script work.

if TextNumber3.Text == (""TextNumber1.Text + TextNumber2.Text.."") then -- Only a part of my script, should be enough

4 comments

0

What are you trying to do?

0

um, tostring converts things into a string, not tonumber

0

oh um.. well.. i'm changing the question wait.

0

well its fixed now XD

1 answer

✓ Accepted answer

Just do this by using the function tostring on the number. However, the Text property of TextLabels, TextButtons and TextBoxes is a string so you really should not worry about that.

if you want to convert it to a number you just use the function tonumber

Hope this helped you.

2 comments

0

does that mean i have to make a variable for it?

0

You just use tostring(number) and it should work as you wish

This discussion is preserved as it was. New answers, comments, and votes are closed.