Script doesn't obey

This is a strange thing to say… but i think my script isn’t “obeying” me. Have a look at this image:

I have an airplane. I need it to go FORWARD, but it is literally going up! As you see in the image, i want my plane to go to the circle marked between the white cubes, and it is going to the “X”. I read in the docs that BLUE stands for FORWARD and GREEN stands for UP in scripting. So what is wrong with my script? I have tested a lot of different combinations of position translation but it simply doesn’t work. What am i doing wrong? By the way, i am beginner at C# so i am probally missing some basic stuff here.

using UnityEngine;
using System.Collections;

public class PlaneControl : MonoBehaviour {
 
 public float speed = 1f;


    void Update()
    {
        transform.position = transform.position + (transform.forward * speed * Time.deltaTime);
    }
}

I commented earlier, but just made the realization that youre using transform.forward which is dependent upon the rotation of your model.

transform.forward is indeed, as you’ve put it, the “BLUE” arrow… however, in your picture, you’re showing the global axes instead of the local axes. transform.forward is a local, relative value. The solution is to rotate the forward vector using your transform’s Quaternion rotation, like so:

transform.position = transform.position + ((transform.rotation * transform.forward) * speed * Time.deltaTime);

That is, of course, assuming you want it to move forward based upon the plane’s rotation, and not just globally forward regardless of the planes rotation. (You would use Vector3.forward instead of transform.forward for that).

Make sure you set your Gizmo mode to “pivot” and “local”: