I tried to make a script what changes the money from 10000 to 10k, or from 10000000 to 10B. The script does not work how it should, and i have no idea how to fix it.
local money = script.Parent.Parent.MoneyValue
local text = script.Parent
while true do
if money.Value < 1000 then
text.Text = money.Value
elseif 1000 < money.Value < 1000000 then
text.Text = money.Value/1000 .."k"
elseif 1000000 < money.Value < 1000000000 then
text.Text = money.Value/1000000 .."B"
elseif 1000000000 < money.Value < 1000000000000 then
text.Text = money.Value/1000000000 .."T"
elseif 1000000000000 < money.Value < 1000000000000000 then
text.Text = money.Value/1000000000000 .."Qd"
elseif 1000000000000000 < money.Value < 1000000000000000000 then
text.Text = money.Value/1000000000000000 .."Qn"
elseif 1000000000000000000 < money.Value then
text.Text = "ERROR"
end
wait(0.05)
end
And if i change the MoneyValue's value to 10000 it gives the following error in the OutPut
14:12:47.097 - Players.Player1.PlayerGui.MenuGui.MoneyLabel.Script:7: attempt to compare boolean with number 14:12:47.098 - Stack Begin 14:12:47.099 - Script 'Players.Player1.PlayerGui.MenuGui.MoneyLabel.Script', Line 7 14:12:47.100 - Stack End

1 comment
Make sure money isn't a boolean?