Hello guys, I know this is a common mistake that circulates around here the more I wanted to know how to fix this script:
using UnityEngine;
using System.Collections;
public class ControladorPersonagem : MonoBehaviour {
public CharacterController CharacterController;
public float characterSpeed;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKey(KeyCode.RightArrow))
{
//meu carinha vai andar para a direita
CharacterController.Move(new Vector3(characterSpeed,0,0)*Time.deltaTime);
}//
if(Input.GetKey(KeyCode.LeftArrow))
{
CharacterController.Move(new Vector3(-characterSpeed,0,0)*Time.deltaTime);
}
I know this has been discussed before here on the forum but I still do not understand how these objects are application, sorry my english.
ty :3
I highly recommend you to stop posting every problem that you face and instead start discovering the tools you’re gonna use i.e. Unity and C#. We cannot solve things for you because you don’t even barely know what is going on. We all had to start from scratch once. I recommend you to watch the beginner level tutorials that Unity offers for free, as well as some C# related tutorials.
You need one more closing bracket. It’s pretty simple but I’m glad to see people getting interested in scripting.
I am new to this too but I think that this could help… I hope
By the way this script does not need the characterController
and I think this can work as its own script right now just copy/paste
//Variables Start
//Public Variables
public int PlayerSpeed = 20;
//Private Variables
private Transform myTransform;
//Variables End
// Use this for initialization
void Start () {
myTransform = transform;
}
// Update is called once per frame
void Update () {
//move the player left and right
myTransform.Translate(Vector3.right * PlayerSpeed * Input.GetAxis("Horizontal") * Time.deltaTime);
}
Again Hopes this helps you 
Infininite Gamer
I followed all the tips and I thank you for them. Decided the following script that the Infinite Gamer despite being good for me is not going to help me continue to video lesson that I see and in which the teacher marked that way the script:
using UnityEngine;
using System.Collections;
public class ControladorPersonagem : MonoBehaviour {
public CharacterController characterController;
public float characterSpeed;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKey(KeyCode.RightArrow))
{
//meu carinha vai andar para a direita
characterController.Move(new Vector3(characterSpeed,0,0)*Time.deltaTime);
}//
if(Input.GetKey(KeyCode.LeftArrow))
{
characterController.Move(new Vector3(-characterSpeed,0,0)*Time.deltaTime);
}
}
}
Ok, everything worked fine but the following error appeared to me:

Please forgive me for the noob questions but I unfortunately did not do well adequei even the interface in English or the scripts that are new to me, thanks for the understandability and again sorry.