Settings[Names].Value = 50
I am making a progress bar and so far. The bar is supposed to put in the percentage of the progress and remove the green bars with the name "A10" and up. Kinda like an incomplete progress bar.
But, I get with line 8 is "attempt to compare string with number", so I change it to strings and it says "attempt to index a nil value" or something like that.
What do I do?
Here is the code:
function ProgressBar(Names)
script.Parent[Names.."Percent"].Text = Settings[Names].Value .. "%"
local t = script.Parent[Names.."Bar"]:GetChildren()
local ConvertValue = Settings[Names].Value / 5
for i,v in pairs(t) do
local A_Num = string.sub(v.Name, 2)
if tonumber(A_Num) <= tonumber(ConvertValue) then
v.Parent["A".. tonumber(A_Num) > tonumber(ConvertValue)].Visible = false
end
end
end
