Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I add kills leaderstats to this?

Asked by 4 years ago

So I am making a game and I want it to display how many kills and how many coins the player has aswell so I made this little script for the gold:

game.Players.PlayerAdded:connect(function(player) local folder = Instance.new("Folder",player) folder.Name = "leaderstats" local currency1 = Instance.new("IntValue",folder) currency1.Name = "Gold"

player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() local tag = character.Humanoid:FindFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then currency1.Value = currency1.Value + 10 --This is the reward after the player died. end end end) end) end)

But I also made a kills one and it doesn't work with it please help me. :(

0
Please format Feroxidus 83 — 4y
0
? Koley_Moley -7 — 4y

Answer this question