Would I use
String.lower()
?
Would I use
String.lower()
?
You can check if a message is a number by using tonumber.
Examples,
local x = 235
if tonumber(x) then
print("Number")
else
print("String")
end
-- OUTPUT
"Number"
local x = "385"
if tonumber(x) then
print("Number")
else
print("String")
end
-- OUTPUT
"Number"
local x = "Batman"
if tonumber(x) then
print("Number")
else
print("String")
end
-- OUTPUT
"String"
Using this you should easily be able to only accept numbers as input.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Already fixed it sorry. But thanks for the help ill use this in the future.