rocket movment

HAY this is rocket i try that every time he will be shot to player position but every rocket move to the same place i dont want the rocket follow the player

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class rocketmove : MonoBehaviour
{
    public float RocketSpeed = 20f;
    Rigidbody2D rb;
    public Transform player;
    Vector2 MoveDiraction;


    void Start()
    {
        rb = GetComponent<Rigidbody2D>();
        MoveDiraction = (player.transform.position - transform.position).normalized * RocketSpeed;
        rb.velocity = new Vector2(MoveDiraction.x, MoveDiraction.y);
        Rotationtoplayer();
        Destroy(gameObject, 3f);
    }
    private void FixedUpdate()
    {
       
    }  

    void DestroyGameObject()//אם מוצאים לפעול פעולה זו האויב יושמד יתפוץ או משהוא בסגנון
    {
        Destroy(gameObject);
    }
    void Rotationtoplayer()
    {
        Vector3 PlayerPosition = player.position;
        Vector2 Playerdirection = new Vector2(PlayerPosition.x - transform.position.x, PlayerPosition.y - transform.position.y);
        transform.up = Playerdirection;

    }
}
MoveDiraction = (player.transform.position - transform.position).normalized * RocketSpeed;

This is what’s making your rocket see your player.

rb.velocity = new Vector2(MoveDiraction.x, MoveDiraction.y);

This is what’s making it follow your player. You’re constantly updating the player’s coordinates and the velocity is moving towards that position.

What I think you want is this:

//Create a rocket spawn point and attach it to your game object
public Transform rocketSpawn;

// You need a reference to your Rigidbody2D component
// This is easy since the script is attached to it already
private Rigidbody2D rocket;

// You've already hardcoded your speed variable
// so you can use yours in this one's place.
private float rocketSpeed = 30f;

private void Start()
{
// Initialize your rigid body component
rocket = GetComponent<Rigidbody2D>();

// Set the force to make the rocket move towards your player
rocket.AddForce(rocketSpawn.up * rocketSpeed, ForceMode.Impulse);

// Insure your rocket will not live forever if it never hits anything
// After 5 seconds the rocket will be deleted.
Destroy(rocket, 5f);
}

Now you only need to set the “up” direction towards the player. Which you already have that code. MoveDiraction (MoveDirection would be the proper English spelling, if you care about that.)

Anyway, MoveDiraction will face your player upon firing. You simply need to hook that up to the code I provided.