make object move in the same direction it faceing

back to my last question rotate an object with keyboard - Questions & Answers - Unity Discussions
now i give my weapon the same direction and that work put it not move in the same direction that i want

i try to use transform.position += transform.forward * Time.deltaTime * movementSpeed;
but it just not moving

I would suggest adding a rigid body to your player if there isn’t one already. If you are using a rigid body, use can do this:

Rigidbody rb;
float speed = 10f;
void Update() {
     rb.AddForce(speed * Input.GetAxis("Vertical") * transform.forward * Time.deltaTime);