Oh the humanity! I need #robloxdev help with a leaderstats problem.

I have a problem. Maybe you can help me solve it. If you can’t reply here, you can find me on twitter @derangedokapi.

So here it is: my previously working leaderboards now look like this:

Notice the column headers on the leaderboard are shifted. The first should be coins, the second should be Tokens, and the third should be Level. The values underneath are correct.

Here’s the code:

configs.leaderstat_values = {
	current_currency = {label = configs.currency_plural, stat = "current_currency", vartype = "StringValue", prepend = configs.currency_prefix},
	current_premium = {label = configs.premium_plural, stat = "current_premium", vartype = "StringValue", prepend = configs.premium_prefix},
	level = {label = "Level", stat = "level", vartype = "NumberValue", prepend = nil},
}

That sets up what values I want (it’s just a housekeeping thing). Here’s where I set up and/or update the leaderboard:

	
if not player:FindFirstChild("leaderstats") then
	local ls = Instance.new("Model")
	ls.Name = "leaderstats"
	ls.Parent = player
	for nm, arr in pairs(configs.leaderstat_values) do
		local v = Instance.new(arr.vartype)
		v.Name = arr.label
		local val = datafetch.getStat(player, arr.stat)
		if arr.vartype == "StringValue" then
			v.Value = arr.prepend .. utils.abbreviateNumberDisplay(val)
		else
			v.Value = val
		end
		v.Parent = ls
	end
end

So basically I’m setting it up and populating it. I’ve tried it the MUCH more explicit way of setting each variable individually (the original battle farm and bubble chase do this). I haven’t touched their code and they are also showing this issue. So I am going to have to assume it was a client or studio change of some kind.

Any help appreciated!