Hello, I made a leaderboard and it doesn’t show big numbers, only up to a million or 9.23Qi and I know the roblox limit and I use number value help me fix it somehow any help is appreciated
--// GENERAL VARIABLES
local DSS = game:GetService("DataStoreService")
local DataStore = DSS:GetOrderedDataStore("test")
local moduleSc = require(game.ReplicatedStorage.Abbreviate)
--// UI VARIABLES
local UI = script.Parent.SurfaceGui
local basePlayerFrame = UI.BasePlayerFrame
local boardFrame = UI.ScrollingFrame
--// Functions
local function SaveData()
for _, player in pairs(game:GetService("Players"):GetPlayers()) do
local plr_key = "id_" .. player.UserId .. "_Strength"
local Strength = player:FindFirstChild("Strength")
if Strength and typeof(Strength.Value) == "number" then
local success, result = pcall(function()
DataStore:SetAsync(plr_key, math.floor(Strength.Value))
end)
if not success then
warn(result)
end
else
warn("Strength " .. player.Name)
end
end
end
local function getTop10Players()
local isAscending = false
local pageSize = 10
local pages = DataStore:GetSortedAsync(isAscending, pageSize)
local top10 = pages:GetCurrentPage()
local top = {}
for rank, data in ipairs(top10) do
local dataName = data.key
local name = game:GetService("Players"):GetNameFromUserIdAsync(dataName:split('_')[2])
local Strength = data.value
local currentPlayer = { Player = name, Strength = Strength, Rank = rank, }
table.insert(top, rank, currentPlayer)
end
return top
end
local function ClearList()
task.spawn(function()
for _, plrFrame in pairs(boardFrame:GetChildren()) do
if not plrFrame:IsA("Frame") then continue end
plrFrame:Destroy()
task.wait(0.25)
end
end)
end
local function UpdateList()
SaveData()
ClearList()
local top50 = getTop10Players()
task.spawn(function()
for _, plr in ipairs(top50) do
local frame = basePlayerFrame:Clone()
frame.Parent = boardFrame
frame.name.Text = plr.Player
frame.Strength.Text = moduleSc.abbreviate(plr.Strength)
frame.rank.Text = plr.Rank
frame.Visible = true
task.wait(0.25)
end
end)
end
task.spawn(function()
while true do
UpdateList()
for count=5,0,-1 do
script.Parent.Part.SurfaceGui.Count.Text = "Leaderboard Updating In:" .. count .. " seconds!"
task.wait(1)
end
end
end)