Hi, idk what its called but i want my text to show numbers i already have that but like it goes 1000000 instead of like 1M and it goes like 10000 instead of 10K and stuff heres my script:
local Player = game.Players.LocalPlayer
local Money = Player:WaitForChild("leaderstats"):WaitForChild("Cash")
script.Parent.Text = "Cash:" ..Money.Value
Money.Changed:Connect(function()
script.Parent.Text = "Cash:" ..Money.Value
end)
local Player = game.Players.LocalPlayer
local Money = Player:WaitForChild("leaderstats"):WaitForChild("Cash")
local function formatNumber(num)
if num >= 1_000_000 then
return string.format("%.1fm", num / 1_000_000)
elseif num >= 1_000 then
return string.format("%.1fk", num / 1_000)
else
return tostring(num)
end
end
script.Parent.Text = "Cash: " .. formatNumber(Money.Value)
Cause that how it works.
CoreGUI responsible for rounding is internal and you are using custom UI for that, there so you have to make formatting yourself.