Random Sprite Throwing?

Hi guys
We just started a new project for our exam tomorrow. We are creating a Duck Hunting style game, where we are trying to get this guy to throw random pieces of fruit into the air.

We are not experienced in Unity or coding in general, so this is our pityful attempt of trying to instantiate random fruit at a location in the game.

using UnityEngine;
using System.Collections;

public class GameController : MonoBehaviour {
  
    public GameObject pineapple;
    public GameObject pear;
    public GameObject strawberry;
    public GameObject banana;
    public GameObject berry;
    public Vector3 spawnValue;

    // Use this for initialization
    void Start () {
        var randomInt = Random.Range (1, 6);
        Vector3 spawnPosition = new Vector3 ();
        Quaternion spawnRotation = new Quaternion ();
        if (randomInt = 1) {
            Instantiate (pineapple, spawnPosition, spawnRotation);
        } else if (randomInt = 2) {
            Instantiate (pear, spawnPosition, spawnRotation);
        } else if (randomInt = 3) {
            Instantiate (strawberry, spawnPosition, spawnRotation);
        } else if (randomInt = 4) {
            Instantiate (banana, spawnPosition, spawnRotation);
        } else (randomInt = 5); {
            Instantiate (berry, spawnPosition, spawnRotation);
        }
      
    }

}

We get these errors:

We hope you can help us in any way.

We want fruit-sprites to be thrown from the dancing guy into the air, and they’re affected by gravity.
Regards

Update: This is our game controller script now:

using UnityEngine;
using System.Collections;

public class GameController : MonoBehaviour {
   
    public GameObject pineapple;
    public GameObject pear;
    public GameObject strawberry;
    public GameObject banana;
    public GameObject berry;
    public Vector3 spawnValue;
    public float startWait;
    public int fruitCount;
    public GUIText scoreText;
    private int score;

    // Use this for initialization
    void Start () {
        StartCoroutine (SpawnWaves ());
       
    }
    IEnumerator SpawnWaves ()
    {
        yield return new WaitForSeconds (startWait);
        while (true)
        {
            for (int i = 0; i < fruitCount; i++)
            {
        var randomInt = Random.value;
        Vector3 spawnPosition = new Vector3 ();
        Quaternion spawnRotation = new Quaternion ();
        if (randomInt < 0.2f) {
            Instantiate (pineapple, spawnPosition, spawnRotation);
        } else if (randomInt < 0.4f) {
            Instantiate (pear, spawnPosition, spawnRotation);
        } else if (randomInt < 0.6f) {
            Instantiate (strawberry, spawnPosition, spawnRotation);
        } else if (randomInt < 0.8f) {
            Instantiate (banana, spawnPosition, spawnRotation);
        } else; {
            Instantiate (berry, spawnPosition, spawnRotation);
        }
    }
}
    }

    public void AddScore (int newScoreValue)
    {
        score += newScoreValue;
        UpdateScore ();
    }

    void UpdateScore ()
    {
        scoreText.text = "Score: " + score;
    }
}

We want to instantiate the fruit by the guys shoulder. There are no errors, but they are not spawning. The fruits have been assigned as prefabs:

We want the fruit to spawn, so we can throw them at random points in the air, while they are affected by gravity.
regards

Hi. Pretty certain you’ll find all you need here: Unity Asset Store - The Best Assets for Game Making

This is exactly why example projects like this exist.