Making an Object Appear

Hi everyone,
I am fairly new too unity so yeh, I was wondering how to get a object to be created once you left click, this object is a bullet which will fire towards the mouse click. SO when i left click how do i get this other object to show up?

whenever possible its best not to create and destroy bullets during run time for proficiency purposes.
i would make the bullet ahead of time and put it in the inspector.

lets assume you have an object named “player” in your game.
and you have another object called “bullet”

here is a script you would attach to the “bullet” object:

var player:GameObject;
    player=gameObject.Find("player");

 var hit:RaycastHit;
 var ray:Ray;
     
var target:Vector3;
var go:Vector3;   
var speed:float;
    speed=10;
function Update () {
gameObject.transform.position = Vector3.MoveTowards(gameObject.transform.position, target,speed*Time.deltaTime);


if (Input.GetMouseButtonDown(1)) {
            transform.position=player.transform.position;
			ray = Camera.main.ScreenPointToRay(Input.mousePosition);
			
			if (Physics.Raycast(ray, hit)) {target=hit.point;
			                                 transform.position=player.transform.position;
			                                 }
			}
}

this would require a ground under your player with a box collider attached

What do you mean here "this would require a ground under your player with a box collider attached
"