How to add score when clicking on a object?

how do you add score when you click and destory an object???
for e.g.i got a bunch of enemies, that when i click on them they get destroyed. so how would you at a score to that? is it tags? btw i got the clicking and destroying already.

Put this in a script of a game object that does not get destroyed.

private int score;
public void UpdateScore(int amount)
    score += amount;

Tag this object to whatever you want. In example “ScoreHandler”.

Then in the same place you destroy your enemies but right befor it, do (set increment to whatever value you want too):

int increment = 10; 
GameObject.FindGameObjectWithTag("ScoreHandler").SendMessage("UpdateScore", increment);

You could set up a script that holds a static variable that keeps track of the score. Then you call some functions that add or subtract the score.

// The score variable
static var playerScore : int;

// The amount variable to add or subtract score
var newPoints : int = 10;

function Start () {
	// Set score at ZERO to start
	playerScore = 0;

// ----- Call one of these functions when you destroy your enemies -----
function AddToScore () {
	playerScore = playerScore + newPoints;

function SubtractFromScore () {
	playerScore = playerScore - newPoints;