First Person Controller falls through the terrain when I added a script

I have a terrain that I got from CityEngine and it has a mesh collider and when I created a first person controller it worked perfectly! But then I wanted to change it because I don’t want it to be controlled by the keyboard. The speed will only be controlled by signals from a virtual com-port. So I put another script on the first person controller. It works fine to make it move forward without pressing a button. But it falls through the terrain when it’s uphill. When its downhill or straight it follows the terrain good. Why doesn’t it work?

Here is my script I added:

public class PlayerController : MonoBehaviour {

public float forwardSpeed = 0.0f;
public float backwardSpeed = 5.0f;
public float rotateSpeed = 0.0f;
public int speed = 50;

// Use this for initialization
void Start () {

// Update is called once per frame
void Update () {

	//Move forward
	forwardSpeed = speed/5;
	transform.position += transform.forward * forwardSpeed * Time.deltaTime;

	transform.Rotate(0.0f, rotateSpeed*Time.deltaTime, 0.0f);
	//Turn left
		rotateSpeed = -50.0f;
	//Turn right
	else if(Input.GetKey(KeyCode.RightArrow))
		rotateSpeed = 50.0f;
	//No turn
		rotateSpeed = 0.0f;

	//Quit application


(The “speed” is the signal from the virtual com-port)

use a box or anything that collides i guess you put the rigid body but to stop from felling uses gravity which definetly needs a colider go into add/phisics/colider OR also mesh renderer and equip the box convex or something like that