In tycoon game, the player's cash values are stored in game.ServerStorage.MoneyStorage.(All of the player's name are IntValue and the value is there money). I wrote this script to try and abbreviate it but it doesn't seem to be working, could someone help out? Nothing is underlined or anything and the output window isn't showing anything.
wait(2) function Convert(num) local x = tostring(num) if #x>=13 then local num1 = (#x-12) return x:sub(0,(num1)).."."..(x:sub(#x-10,(#x-10))).."Q+" --Quadrillion elseif #x>=10 then local num1 = (#x-9) return x:sub(0,(num1)).."."..(x:sub(#x-7,(#x-7))).."B+" --Billion elseif #x>= 7 then local num1 = (#x-6) return x:sub(0,(num1)).."."..(x:sub(#x-5,(#x-5))).."M+" --Million elseif #x>=4 then return x:sub(0,(#x-3)).."."..(x:sub(#x-2,(#x-2))).."K+" --Thousand else return num end end local number = game.ServerStorage.MoneyStorage:GetChildren() number.Value.Changed:connect(function() number.Value = Convert(number.Value) end)