I think its got something to do with vector 2 getting flipped when my player turns left
this is my bullet code so far
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class projectileforce : MonoBehaviour {
public float shootspeed = 0;
// Use this for initialization
void Start () {
transform.Translate(Vector2.right * 4F * shootspeed);
}
// Update is called once per frame
void Update () {
}
}
You can make second bullet with: transform.Translate(Vector2.left * 4F * shootspeed); and spawn needed bullet depended on players face (I think, you have something “isFacingRight” in the Players script, then spawn bullet flying right, if it is true and spawn other bullet, if it is false).
thank you I gave it a go with this
void Update () {
if (characterEngine.facingRight == true)
transform.Translate(Vector2.right * 4F * shootspeed);
if (characterEngine.facingRight == false)
transform.Translate(Vector2.left * 4F * shootspeed);
seems to work but I cant destroy the bullets because of ridgedbody
Can’t destroy them? Do you destroy them on impact and/or after a certain amount of time/distance?
I tried by time and I’m getting an error about ridbody not getting called then its not letting me shoot at all thanks for the reply
Sure, what is the exact error, because I don’t understand from the way you described it.
Also, can you post the code in question, with the ‘Destroy’ call?
Should be something like (on the script on the bullet):
void Start() {
Destroy(gameObject, 4); // or whatever time.
}
ill get right on that thanks again ill post the error code 
MissingReferenceException: The object of type ‘Rigidbody2D’ has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Object.Internal_InstantiateSingle (UnityEngine.Object data, Vector3 pos, Quaternion rot) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineObjectBindings.gen.cs:52)
UnityEngine.Object.Instantiate (UnityEngine.Object original, Vector3 position, Quaternion rotation) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:156)
UnityEngine.Object.Instantiate[Rigidbody2D] (UnityEngine.Rigidbody2D original, Vector3 position, Quaternion rotation) (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.cs:206)
gunshooting.FixedUpdate () (at Assets/gunshooting.cs:25)
Okay, well some code is trying to access a destroy rigidbody. Perhaps with your code posted, it’ll be possible to spot where. Include the line number, as it appears in the posted code, where the error occurs, if one was given*. 
I think its from this
using UnityEngine;
using System.Collections;
public class gunshooting : MonoBehaviour
{
public Rigidbody2D projectile;
public float speed = 20;
public float fireRate = 0.9f;
public float nextFire = 0.9f;
private void Start()
{
float rtrig = Input.GetAxis(“rtrig”);
}
// Update is called once per frame
void FixedUpdate()
{
if (Mathf.Round(Input.GetAxisRaw(“rtrig”)) < 0)
{
if (Time.time > nextFire)
{
nextFire = Time.time + fireRate;
Rigidbody2D instantiatedProjectile = Instantiate(projectile, transform.position, transform.rotation) as Rigidbody2D;
instantiatedProjectile.velocity = transform.TransformDirection(new Vector3(0, 0, speed));
}
}
}
}
thanks again for all this help
I don’t see any code there talking about destroying the projectile. There aren’t errors in this code, are there?
If so, which line?
If not, post the code (line/s) that do have the error.
When posting code on the forums, please use code tags - which you can read about here: Using code tags properly - Unity Engine - Unity Discussions
I just tried this seems to work
if (gameObject.name == “projectile_0(Clone)”)
{
Destroy(gameObject, 5);
}
I think its cus I was not using a prefab
Hm, okay… Sorry for the little bit of confusion.
I maybe see what you meant there, because you cannot call destroy on a rigidbody exactly, but you could use this:
Destroy(instantiatedProjectile.gameObject, 5);
If you add that line of code, after it’s instantiated.
thanks again dude with all the help ive only got 5 or so bullets in game at a time seems like that’s fixing it now