You can write your topic however you want, but you need to answer these questions:
-
I want to check if something is a number.
-
Idk how
-
I tried one thing but it did not work.
The thing is from a text box.
You can write your topic however you want, but you need to answer these questions:
I want to check if something is a number.
Idk how
I tried one thing but it did not work.
The thing is from a text box.
typeof() is used to check if its a number,string or boolean so you can do something like
if typeof(textbox.Text) == "number" then
--do something
end
To check whether it is a string or a number or a boolean you can use this function called typeof
here is an example:
This returned me String in the output because magnus is a string.
in case of textbox you can take the input of the player in the text box and check the type with this.
and then you can use a if statement
if textboxinput == number then
–do what you intend
end
Thanks!