So I've made it when a player dies their "level" in the leaderboard goes down. How would I make it so if they kill someone it would go up? I've tried playing around with other ko leaderboard scripts but I cant seem to get it to work. Here's my code:
game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model") leaderstats.Name = "leaderstats" leaderstats.Parent = player local level = Instance.new("IntValue") level.Name = "Level" level.Value = 0 level.Parent = leaderstats end) game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() local level = player.leaderstats.Level level.Value = level.Value - 1 end) end) end)
How is the player killing other players? If the player is using a sword for instance, then you would add the code into the sword around where the sword takes health away from the other player. Basically, you would have to place the code into the item you're using to kill other players and if that sword/gun kills the player, you would then add a point to the player using the weapon.
Hope I helped a little in your problem! Good luck.