local players = game:GetService("Players")
players.PlayerAdded:connect(function(players)
if players then
local folder = Instance.new("Folder")
folder.Name = "leaderstats"
folder.Parent = players
local Coins = Instance.new("IntValue")
Coins.name = "Coins"
Coins.Parent = folder
Coins.value = 125
end
end)
COMMUNITY QUESTION
why is it not showing up in the leader board?
1 answer
You have some spelling mistakes thats why it doesnt work, this should work!
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
local folder = Instance.new("Folder")
folder.Parent = player
folder.Name = "leaderstats"
local Coins = Instance.new("IntValue")
Coins.Parent = folder
Coins.Name = "Coins"
Coins.Value = 125
end)
Read more here: https://developer.roblox.com/en-us/articles/Leaderboards
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
change the argument in the function to just "player", and change the parent of the folder to "player"
You shouldn't have 2 same variables/parameters. You set players value to both the player (parameter) that joined and the service