JavaScript or C# Object Move Forward Help

Hi,

I need some help with making my object called “P2” move forward when I press the Up button.
I have searched the forums and other documentation but could not find what I was looking for. Or maybe I just didn’t realise that it was there.

If you could also tell me where you found the information that would be good, so I know where to look for next time.

Thank you,
Kingrat

//Help/Scripting Reference/RunTime Classes/Transform
function Update() {
  if(Input.GetKeyDown("up")) {
    transform.Translate(Vector3.forward * Time.deltaTime);
  }
}

:slight_smile: