Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How to find out whether a variable/value is numerical?

Asked by
Wutras 294 Moderation Voter
8 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

I'm currently doing some basic math functions for a ModuleScript and have been wondering whether there is a way to find out if the value/variable is numerical. I'm having a table given as argument and the script is supposed to find out whether the values inside of the table are numerical to prevent any kind of errors. Those values can be strings, numerical values such as 1 or 2 or objects in workspace.

0
I kind of have to ask, are these like values such as StringValue, NumberValue, or other value objects. Or something along the lines of values in a table like local tab = {1,'hello',55,{'test'}}? M39a9am3R 3210 — 8y

Answer this question