I’m wondering how to make the player Levels show up on the leaderboard? I’m new to programming but my guess is that it’s something to do with not assigning the leaderstat value to a folder specifically named “leaderstat.” Any help is greatly appreciated, thanks!
game.Players.PlayerAdded:Connect(function(player)
local level = Instance.new("IntValue", player)
level.Name = "Level"
level.Value = 1
local exp = Instance.new("IntValue", level)
exp.Name = "Current"
exp.Value = 0
local maxExp = Instance.new("IntValue", level)
maxExp.Name = "Max"
maxExp.Value = 100
-- continous loop
function additionXP()
player.Level.Current.Value = player.Level.Current.Value + 25
end
while true do
wait(30)
additionXP()
print("XP given!")
if exp.Value >= maxExp.Value then
level.Value = level.Value + 1
exp.Value = 0
maxExp.Value = maxExp.Value + 100
end
end
end)
*Edit, uploaded wrong script