How to make the bullet shoot

Already tried all methods available , but they all shoot in the same direction .
I am a beginner but I need to make the shoot as fast as possible .
In the script I usually intancio , however , is to move when it moves only in one direction , even when my player is aiming for the side or back .

Ou a bala simplesmente nen anda, fica no mesmo lugar até sumir, os dois metodos eu obtive apenas a instanciação e que a bala aponte para a posição que foi mirado

Shooting/InstantiateCode

function Update () {
	if (Input.GetKeyDown("space")){
		Tiro();	
		transform.position += Vector3.forward * speed * Time.deltaTime;
	}
}
function Tiro(){
	Instantiate(PTiro,transform.position,transform.rotation);
}

Please can someone tell me why I just can not I ?

The problem is here:

Instantiate(PTiro,transform.position,transform.rotation);

Instead of ‘transform.rotation’, you need to supply a rotation that points in the direction you want. Assuming transform.rotation isn’t changing elsewhere in your code, it will always point in the same direction, so your bullets will always go in the same direction.

Try something like:

public GameObject enemy; //set this to your target
function Tiro(){
  transform.LookAt(enemy);
  Instantiate(PTiro,transform.position,transform.rotation);
}

…and see if that gets you closer to what you want.