local l = Instance.new("IntValue", p) l.Name = "leaderstats" if rawData == nil then local Strength = Instance.new("IntValue", l) Strength.Name = "Strength" Strength.Value = 0 local Defense = Instance.new("IntValue", l) Defense.Name = "Defense" Defense.Value = 0 else for i, v in pairs(rawData) do local a = Instance.new("IntValue", l) a.Name = i a.Value = v end end
I have this script, and for some reason I can't identify, the leaderboard does not appear. In studio, I can see that the values are there with the correct names. So why does this leaderboard not display? Other leaderboard scripts work.
You havent posted the full script so this answer might be subject to errors.
What you did was instead of adding leaderstats as a "Model", you created a value which wont work. Assuming that p=player and rawData is already defined, the script below should help you.
MODIFIED SCRIPT
local l = Instance.new("Model", p) l.Name = "leaderstats" if rawData == nil then local Strength = Instance.new("IntValue", l) Strength.Name = "Strength" Strength.Value = 0 local Defense = Instance.new("IntValue", l) Defense.Name = "Defense" Defense.Value = 0 else for i, v in pairs(rawData) do local a = Instance.new("IntValue", l) a.Name = i a.Value = v end end
In future questions, make sure to post the full script for a better service. I hope this answers your question and if it did, make sure to upvote. Thank you!