Need a leaderboard displaying how much items a person has

Hi, welcome to my topic, this is my first post in this category

  1. What do you want to achieve? I want a working physical leaderboard for my game

  2. What is the issue? I want to have a working leaderboard for my game
    Untitled Code Game - Roblox

  3. What solutions have you tried so far? I looked on YouTube, and tried searching the devforum, nothing worked

-- If this is rushed, its because it is

Thanks 7 :money_with_wings:

I accidentally pressed create topic, so yeah, its early, what i need is a leaderboard displaying how much items a person has.

I answered the 3 questions, so I can post here :sweat_smile:

Ive looked here:

Anything helps, I have no idea how to script
Help
7 :money_with_wings:

what type of leaderboard board you want ?

place that inside serverscript service it will help littel

game.Players.PlayerAdded:Connect(function(p)
	local add = Instance.new("Folder")
	add.Name = "leaderstats"
	add.Parent = p
	local val = Instance.new("IntValue")
	val.Name = "items"
	val.Parent = add
	
end)
while true do
for i,v in pairs(game.Players:GetChildren()) do
	if v:IsA("Player") then
		back = v:WaitForChild("Backpack")
		v.leaderstats.items.Value = #back:GetChildren() 
		wait()
	end
	end
	wait()
	end

Thank you for the first reply! :sunglasses:

How would I put this on a physical leaderboard though? I put in a custom playerlist thing, so it won’t show up
Once I use the tool i have, the leaderboard will go down one number

Thanks again :+1:
UPDATE, i will just make you have a solution, the leaderstats works well, but please fix