Need help with character moving

move if in wrong section
before i tell you what i need help with in detail, let me tell you this straight away: I have recently gotten into making games and all of that stuff and yes i have gone through tutorials, but none can help me with this problem. Here it is:

So i am working on the coding for a character in a game i am working on. Currently the character you move around is just a cube but who cares. So i am working on getting it to move around, going forwards and turning. The cube turns flawlessly, but when ever i try and move the cube forwards, it just falls over.
here is a demonstration:

(the red light is there so you can see what side it should move forward on)
To help you find the problem, here is a screenshot of the cube inspector: first half:

second half:

Here is the the coding for the movement:

If you need anything else to help fix this problem, just post a reply. Thank you for your time.

-niilo789

I think the problem may be that there’s too much friction between the Box Collider and the floor. So instead of moving forward, the cube just falls over. Try using a Capsule Collider instead of the Box Collider and see if that helps.

I’m pretty new to Unity, but I have never used a Rigidbody on a player setup. I have always used a Character Controller - you don’t even need a separate collider component. You may want to consider going this route.

Also, you probably want to have all physical movement performed in the FixedUpdate() function instead of Update().