Vector3.forward not moving in direction of player?

Im really new so if any answers could be as simple as explained as possible so I can learn that would be great :slight_smile:

Now, Ive got a character that moves forwards and backwards great, and rotates pretty good too. But if you rotate the character he does not follow the direction. I mean if you turn, it turns but if you go forward after he still goes straight, not the direction youre aiming at. Thanks!

using UnityEngine;
using System.Collections;

public class Addbuttons : MonoBehaviour {
void OnGUI()
{
		//Forwards
    if (GUI.RepeatButton(new Rect(65, Screen.height-125, 70, 30), "Forward") == true)
    {
		GameObject Player = GameObject.Find("objPlayer");
        Player.transform.Translate(Vector3.forward/20 , Space.World);
    }
		//Backwards
    if (GUI.RepeatButton(new Rect(65, Screen.height-50, 70, 30), "Backward") == true)
    {
        GameObject Player = GameObject.Find("objPlayer");
        Player.transform.Translate(Vector3.back/20 , Space.World);
    }
		//Left
	if (GUI.RepeatButton(new Rect(10, Screen.height-90, 70, 30), "Left") == true)
    {
        GameObject Player = GameObject.Find("objPlayer");
        Player.transform.Rotate(0,-2,0);
    }
		//Right
	if (GUI.RepeatButton(new Rect(120, Screen.height-90, 70, 30), "Right") == true)
    {
        GameObject Player = GameObject.Find("objPlayer");
        Player.transform.Rotate(0,2,0);
    }
}
	
	// Update is called once per frame
	void Update () {
	
	}
}

Vector3.forward is always (0,0,1) in world space meaning the blue line in the world, the one in the top right corner. This one is the same for all objects.

What you want is transform.forward which is the forward in object space, the blue line of your object. This one is specific to each object.