Absolute beginner here! My cube won't move :(

I’m getting no errors from my script, but when I play in game mode nothing happens to my poor cube. :frowning:

using UnityEngine;
using System.Collections;

public class Movement : MonoBehaviour
{
	public float movespeed = 5f; //Change this to change how fast he moves
	public float turnspeed = 5f; //Change this to change how quick he turns
	
	void update () //Class - Subroutine. Void means no variables coming out. () signifies class. 
	{
		if(Input.GetKeyDown(KeyCode.UpArrow)) //If the button is pressed then it will execute the next line.
			transform.Translate(Vector3.forward * movespeed * Time.deltaTime); //It moves the character forward by the speed times delta time.			
	}
			
}

About the movemente:
U need to declare only a variable after the script’s class and then multiply it to add the movement along the axis u want:
using UnityEngine;
using System.Collections;

public class lerpSphere : MonoBehaviour {
	
	public float m_speed = 2.0f;
	
	// Use this for initialization
	void Start () {
	}
		
	
	// Update is called once per frame
	void Update () {
	
		
		if (Input.GetKey(KeyCode.A))
		{
			transform.Translate (m_speed*Time.deltaTime,0,0);
		}
		
		if (Input.GetKey(KeyCode.D))
		{
			
			transform.Translate (-m_speed*Time.deltaTime,0,0);
		}
}	
}

Cheers

I assume by forward you mean along the z-axis. Change your code to be:

transform.Translate(0, 0, movespeed * Time.deltaTime);

That’s it.