Hi, this script is supposed to give the player who killed another player money, however the player who died is the one who gets it. Any reason why this is?
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
character.leaderstats.Gold.Value = player.leaderstats.Gold.Value + 10
end
end
end)
end)
end)

1 comment
Nevermind, ignore #4