How to make multiple leaderstats show up?

[Theres more code but it’s unnecessary and like 900 lines]

players.PlayerAdded:Connect(function(plr)
	
	local plrStats = Instance.new("Folder", plr)
	plrStats.Name = "PlayerStats"
	
	local publicStats = Instance.new("Folder", plr)
	publicStats.Name = "leaderstats"
	
	local Rolls = Instance.new("IntValue", publicStats)
	Rolls.Name = "Rolls"
	

	local Cash = Instance.new("IntValue", publicStats)
	Cash.Name = "Cash"

	local Gems = Instance.new("IntValue", publicStats)
	Gems.Name = "Gems"

only one random one shows up sometimes and sometimes all of them show up

They show up if they’re in a folder called “leaderstats” if that’s what you mean.

Note that the built in leaderboard can only hold 4 values. Make a custom leaderboard if necessary.

theres three values. the code isn’t right and they are in a folder
[shown in `local plrStats = Instance.new(“Folder”, plr)
plrStats.Name = “PlayerStats”

local publicStats = Instance.new("Folder", plr)
publicStats.Name = "leaderstats"`

Did you assign values for each variable yet

yes, I’ve also tried checking like every post, can’t fix it…

Can you screenshot the leaderstat folder from the server and client and the ingame leaderboard?

I can try give me a second
Screenshot 2024-05-18 at 7.32.24 AM
strangely enough it shows 3 but only 1 has all three???

now the thing is i see what the issue is but I can’t seem to fix it…

Why do u have 3 folders bruhhh…

basically it’s duplicating the folder 3 times but only one has all three

exactly what I’m trying to fix. this is breaking the system
[its like a 33.3333% chance u get all 3]

just to note before I added those to the script there was only one folder. I think something in the code caused the folder to be made three times dunno why tho

Obviously in the outer loop which you haven’t shown

whats that? I’m confused /?!?!?!?

i changed nothing to add the cash and gems value when there was only rolls value and nothing else

ok that made no sense lemme rephrase that
I changed only the lines shown originally in the post and nothing else [I added cash and gem value and the roll one was the only one never changed]

so basically the issue is nothing but the fact that there are 3 folders which break the leaderstats thats it

i may have fixed one of the folders too, let me check

Screenshot 2024-05-18 at 7.40.10 AM
only two folders now!!!