ENEMY MOVEMENT SCRIPT could somebody please help me make a enemy movement script Ive been working on this script for 2 month please help

using UnityEngine;
using System.Collections;
using UnityEngine.AI;

public class Enemymovement : MonoBehaviour
private bool pursue;
float firingPause;
//public GameObject Subo;
Subhealth submarinehealth;
EnemyHealth enemysub;
public int Enemyspeed = 100;
private Transform Sub; //this is so the enemey sub will move towards the player but it obivoulsy isnt in code yet so the enemy wont move until put in code
NavMeshAgent NavAgent;
private Transform Player;
//you need this for nav mesh
//Transform SubPosition;
// Use this for initialization

void Start () 
	NavAgent = GetComponent <NavMeshAgent> ();

	Sub = GameObject.FindGameObjectWithTag ("Player").transform; // this sets it to find the player sub but not attack we could change the sub to chase a AI or game object if we want to

	//NavAgent = GetComponent <NavMeshAgent> ();

// Update is called once per frame
void FixedUpdate ()
	MovetowardsPlayer ();

void MovetowardsPlayer () {
	if (Sub != null) { //! null means if theres not a player to go towards then enemy does nothing 
		SetNavdestination (Sub);

public void SetNavdestination (Transform Sub) {


	NavAgent.SetDestination (Sub.position); //navAgent is the nav mesh and its just asking where do you want to go we put Sub position and it tells the nav mesh it wants to go towards the sub/player

		Enemyspeed = 10;



Might want to check formatting of question, as for me the script is all out of wack.
First question is have you debuged to check that sub is not always null?
to make sure you always find the player, you can just make a singleton player class and find that, rather than tracking the player with tags (works similarly but imo is more easily debuged)