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

tonumber only working in studio?

Asked by 8 years ago

I've been attempting through multiple different methods to try and get a tonumber to check if a text is string or not, however it works perfectly in edit mode(studio) but not at all in game.

function imput()
    if Active==true then return end
    Active=true
    if tonumber(Imput.Text) ~= nil then
        print("Is a numeric value")
        Imput.Data.Value=true
    else
        Imput.Text="Imput"
        Imput.Data.Value=false
    end
    wait()
    Active=false
end

In game it constantly goes through to the "else" part of the script, even though the value inputted was a numeric value.

(Also, I spelt "imput" like that on my own accord)

0
Is FilteringEnabled on? User#6546 35 — 8y
0
How are you calling the function? M39a9am3R 3210 — 8y
0
Yes, it is being called, filtering is off Hexcalibur 10 — 8y

Answer this question