How to Create a Point System?

Now, I am a newb, so this is probably really obvious, but I was wondering if anyone could help me.
First off, I’m designing a 2D space shooter and whenever I kill an enemy ship, I’d like the score to go up in the top right corner. Thanks for the help!

@squishy_biscuit

NOTE: I’m assuming that you already have a script which makes the player shoot and detect if the bullet hit the enemy. If you’ve just started with nothing, reply me, and I’ll try to also make that part

You could create a UI text and position it where you want, and rename it to Score by selecting it and hitting F2:

Then change the settings (you should choose how you like the text to be, not copy paste my settings):

I’ll create 2 scripts, one for the enemy, and the other one for the player:

And then I’ll open the enemy script, and in there I’ll add this code(just read the comments, marked with //)

NOTE: I’m assuming you’ve already done the scripting for the player shooting, and a way to detect when a bullet hit the enemy

Enemy Script:

using UnityEngine;
using UnityEngine.UI;

//It should inherit from MonoBehaivor because it needs to be placed onto the Enemy GameObject
public class Enemy : MonoBehaviour {

	//The health of the enemy
	public int Health = 100;

	//A reference to the score, so that whenever the enemy dies, we can update the score
	public Text Score;

	//A funtion(method) which will be called whenever the enemy dies
	public void Kill()
	{
		//When the enemy dies, the GameObject should be destroyed;
		//NOTE: You could make it so it plays an animation whenever the enemy dies, and maybe you 
            //could change the texture to a destroyed version of it
		Destroy(this);

		//We want to access the text of the score, and change it to be equal to the current score + 1;
		//int.Parse is a function that transform a string into an integer
		//after we've converted the string we can now add + 1 to it
		//you could also have a variable which defines how much you want to add to the score
		//for each enemy kill
		//then we remain with an integer, so we need to convert it back to a string,
            //by using the ToString() function
		//NOTE: You can also have a score variable, so that you could just do somethig like this:
		//score++;
		//Score.text = score.ToString();
		Score.text = (int.Parse(Score.text) + 1).ToString();
	}

}

And here’s code for the player script:

using UnityEngine;

public class Player : MonoBehaviour {

	//Whenever you hit an enemy you should update it's health
	//That's assuming you already have a player that can shoot and then if the bullet hits the enemy, 
    //this function will be called by passing in as a parameter the enemy that was hit by the bullet
	void Hit(Enemy enemy)
	{
		//We decrease the enemy's health by one (you could have a variable which defines how much 
            //the bullet is damaging)
		enemy.Health--;

		//If the enemy's health it's below or equal to 0
		if(enemy.Health <= 0)
		{
			//then we want to call the kill function from the enemy
			enemy.Kill();
		}
	}
} 

Now enter back into unity and assign the scripts to your enemy and player GameObjects. I just created some empty GameObjects and assigned the scripts that we’ve created to them to them:

For the enemy you should also assign the Score to it:
First Click on the circle that’s in the same line with “Score”:

Then click on Score to assign it:

Now you should be good to go. I remind you, as I said at the start, I’m assuming you already have the scripting for shooting. If you don’t have it, then leave me a reply and I’ll see what I can do. You can also reply me if the code has any errors.

I hope this helped you :))