local cash = script.Parent.Parent.Parent.Parent.Parent.Parent.Cash.Value local text = script.Parent if cash > 9999999 then text.FontSize = 36 end
This doesnt give me any errors but it also doesnt work.
Considering the amount of nines in your evaluation of cash's value, I assume you want the text's FontSize to increase if the cash's value is greater than or equal to a billion. Therefore, I simplified it into the code displayed below..
If the code below doesn't work, provide an output so that we know what exactly is the issue
local cash = script.Parent.Parent.Parent.Parent.Parent.Parent.Cash local text = script.Parent cash.Changed:connect(function() if cash.Value > 1e7 then text.FontSize = Enum.FontSize.Size36 end end)
1e7
represents the number1
followed by7
zeros, in other wordsone billion
.
My guess that you wan't the FontSize
to change when the cash becomes more or less than 9999999
You can do this in a few different ways, but I'm not going to post them all:
Using While, do
local cash = script.Parent.Parent.Parent.Parent.Parent.Parent.Cash.Value local text = script.Parent while wait() do if cash > 9999999 then text.FontSize = 36 end end
Using Changed
function
local cash = script.Parent.Parent.Parent.Parent.Parent.Parent.Cash local text = script.Parent cash.Changed:connect(function() if cash > 9999999 then text.FontSize = 36 end end)