LeaderStats = { "Kills", "Deaths", "Credits" }
function CreateLeaderboard(Player)
PlayerStats = Instance.new("IntValue", Player)
PlayerStats.Name = "leaderstats"
for Counter = 1, #LeaderStats do
NewLeaderstat = Instance.new("IntValue", PlayerStats)
NewLeaderstat.Name = LeaderStats[Counter]
end
end
game.Players.PlayerAdded:connect(function(Player) print(tostring(Player) .. " has joined the game!") CreateLeaderboard(Player) end)
That's the script that I have to modify, but whenever I try to add something that changes the leaderstats values, the leaderboard disappears.

1 comment
The leaderboard itsself is showing up until I actually put something in like a function that adds Credits every minute or every kill.