How would I make a "Kills" leaderboard?

How would I make a “Kills” leaderboard? I’m creating a normal and basic sword fight game and I want a kills leaderboard. I’m using a basic Classic Sword in the game. How would I do this?

9 Likes

Is this what you are talking about? In-Experience Leaderboards | Documentation - Roblox Creator Hub

2 Likes

Make a script to insert a leaderstats Folder and an IntValue for kills into every player when they join like so:

game.Players.PlayerAdded:Connect(function(player)
    local leaderstats = Instance.new("Folder", player)
    leaderstats.Name = "leaderstats"
    local kills = Instance.new("IntValue", leaderstats)
    kills.Name = "Kills"
end)

You can then add on to this value every time a player gets a kill.

10 Likes

Roblox has a WO/KO leaderboard as a model, if that’s what you’re looking for.

4 Likes

Don’t mean to bring this back, but where can I find that model?

1 Like

https://create.roblox.com/marketplace/asset/53310/Leaderboard

2 Likes

i hate to necropost but that official script made by roblox themselves didnt agree with studio for me, kept crashing, and besides the KO counter didnt even work

3 Likes