So, I'm trying to create a leaderboard through instantiation, but it doesn't seem to be working. Does anyone know what I'm doing incorrectly here? This is a local script being kept in StarterPlayerScripts. Here's my code:
game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Model")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local leaflets = Instance.new("IntValue")
leaflets.Name = "Leaflets"
leaflets.Value = 0
leaflets.Parent = leaderstats
end)
Thanks in advance.

2 comments
The wiki says that the leaderstats value should be either a model or a folder, and a value object may not work. After some testing, this solution doesn't seem to work, either.
'leaderstats has to also be an int value.'