Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

1 comment

0

Edited: Wrapped code in code block (you can do this by selecting the code and pressing the "Lua" button to the right of Bold/Italics/etc)

1 answer

✓ Accepted answer

You disabled the script so the code wont run anymore

This discussion is preserved as it was. New answers, comments, and votes are closed.