Is there a way to make a follow script without NavMesh?

Is there a way to make a character move towards the player, exactly like Nav but not since Nav breaks my game? Can you post the script please?

I need an answer TODAY!


Hey there. First of all sorry for my bad english. If you are still asking how to do that,here is a code that I made some weeks ago.
Unfortunatley this code let the character move through walls and collider obstacle.

float moveSpeed=3.0f;
private GameObject character;
public GameObject player;
void Start(){
character = GetComponent<GameObject>();

void Update(){
//code for looking to player
character.transform.rotation = Quaternion.Slerp(character.transform.rotation,
Quaternion.LookRotation(player.transform.position - character.transform.position), 3 * Time.deltaTime);

//code for following the player
character.transform.position += character.transform.forward * moveSpeed * Time.deltaTime;