How do i make my character look at my mouse (top down shooter)

I’am making a shooter game in Unity (something like the tutorial survival game) but my character wont look at my cursor and everytime i look it up on the internet and use a script my character wont turn left or right on his axis but forward and go into the ground.

What iam currently using is this:

**// Turn the player to face the mouse cursor. the Turning ();
(doesnt even move him in anyway)
I got this from learn tutorials for unity

Iam very new to unity so iam terrible with the script but does someone know hoe to fix this?

Try this

transform.LookAt(Input.mousePosition);

void Update(){
Vector3 lookTarget;
var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
RaycastHit hit;
if (Physics.Raycast (ray, out hit)) {
lookTarget = hit.point;
}
transform.LookAt (lookTarget);
}

May above code help you??