Attempt to compare string <= number

So basically,I used the profileservice module and try to compare the value of it.
But I got this output:

Attempt to compare string <= number

But I already tonumber() all the value

Here is the script:


Local Data = datamanager:Get(player)
Local comp = tonumber(Data.stat.rec)
print(comp) --output is 0
Local average = tonumber(roundedaverage)
print(average) --output is 0.6777777
If comp <= 0 then --error occured
...
else if average <= comp then
...
end
end