I'm currently learning scripting from Peasfactory's youtube channel. I'm currently working on making my first leaderboard and using the script I made below.
game.Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("IntValue", player) stats.Name = "Leaderstats"
local points = Instance.new("IntValue", leaderstats) points.Name = "Points" points.Value = 0
end)
For some reason everytime I tried testing it the leaderboard does not show up. I am testing this in a local 1 player server and not in a solo server. I have also tried it with multiple players and the leaderboard still does not show up. I have even gone to other youtube channels who suggested I change the "local leaderstats" from an "intvalue" to "folders", "models", etc. Those did not work either. I am suspecting that "Filtering Enabled is the main culprit here but I am very unsure of this as I am still just a beginner. Any feedback and help would be greatly appreciated. Thank you for taking the time to help address my issue.
You have some errors in your code. First of all, you tried to name "stats", which doesn't exist. Also, leaderstats should be a lowercase l not uppercase.
Here's the script that worked for me.
game.Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("IntValue", player) local points = Instance.new("IntValue", leaderstats) leaderstats.Name = "leaderstats" points.Name = "Points" points.Value = 0 end)