Add velocity to a projectile

Hello!

I have already made a script that instantiates the projectile where i want to. Now, i want to give that projectile forward speed. This is what i have so far:

using UnityEngine;
using System.Collections;

public class B307 : MonoBehaviour {

	public float BulletSpeed;
	public float DamageMin;
	public float DamageMax;

	// Use this for initialization
	void Start () {

		this.GetComponent<Rigidbody2D> ();
	
	}
	

	void Update () {

		this.rigidbody2D.AddForce(transform.forward*BulletSpeed);
	
	}
}

But it wont add the speed, the projectile still just instantiates at a set position in the universe without moving forward.

Any thoughts on how to fix it?

Thank you!

Are you sure that transform.forward is the right direction vector? In a 2D environment, transform.forward is positive z axis, so the projectile would fly into the background, which wouldn’t be visible due to the orthographic camera and sprite rendering. Use transform.up instead, which is positive y (for top-down perspective), or transform.right for positive x (for sidescrolling perspective).