cash on kill script and it does not show the leaderboard what did i do wrong?
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder",player)
leaderstats.Name = "leaderstats"
local cash = Instance.new("IntValue",leaderstats)
cash.Name = "Cash"
cash.Value = 0
player.CharacterAdded:Connect(function(character)
character.Humanoid.Died:Connect(function()
local tag = character.Humanoid:FindFirstChild("creator")
if tag ~= nil then
local Award = 10
local player = tag.Value
local leaderstats = player:WaitForChild("leaderstats")
leaderstats.Cash.Value = leaderstats.Cash.Value + Award
end
end)
end)
end)
script.Disabled = true