Cannot cast from source type to destination type. Instantiate a Rigidbody2D

The problem that I am experiencing is that whenever I try to instantiate a bullet, the game pauses and I get this error: “InvalidCastException: Cannot cast from source type to destination type.
SpaceShipShoot.Update () (at Assets/Scripts/Level2/SpaceShipShoot.cs:28)”.
I have made bullet shoots before, but now that I am making it with a Rigidbody 2D this problem is happening, any ideas?

Instantiate part of code:

Rigidbody2D clone;
clone = (Rigidbody2D)Instantiate(bullet, heroShip.transform.position, Quaternion.identity);
clone.velocity = Vector2.right * bulletSpeed;

‘bullet’ needs to be a Rigidbody2D, or you should instantiate it as a GameObject.

is ‘bullet’ a prefab that you assign to? Try something like this:

Rigidbody2D clone;
GameObject temp;
temp = (GameObject)Instantiate(bullet, heroShip.transform.position, Quaternion.identity);
clone = temp.GetComponent<Rigidbody2D>();