I need to add this wait to allow other scripts to generate their leaderstats before mine, and I don't know what those scripts are as this will be a public script, so when I attempt to do:
local leaderstats = player:FindFirstChild("leaderstats");
local moneyStat = player:FindFirstChild(settings["MoneyName"]);
if (leaderstats == nil) then
leaderstats = Instance.new("IntValue", player);
leaderstats.Name = "leaderstats";
end
if (moneyStat == nil) then
moneyStat = Instance.new("IntValue", leaderstats);
moneyStat .Name = settings["MoneyName"];
end
It works fine as the 'leaderstat' and the moneyStat IntValue are inside the player but they do not show up for the player's leaderboard.

1 comment
Make all the stats in one script. That will fix you issue.