I am making a game that will record your kills and deaths, please help me in making a script for making a leaderboard.
The current ROBLOX leaderboard will detect KOs and WOs automatically by default.
Here's some code to help you:
Game.Players.PlayerAdded:connect(function(player) Instance.new("IntValue",player).Name='leaderstats' Instance.new("IntValue,player.leaderstats).Name='KOs' Instance.new("IntValue,player.leaderstats).Name='WOs' end)
The first answer is actually very buggy and incorrect. Here is how you actually give the values:
game.Players.PlayerAdded:connect(function(player) L = Instance.new("IntValue",player) L.Name = "Leaderstats" K = Instance.new("IntValue",player.leaderstats) K.Name = "KOs" end)