Character not rotating

I have this script on my character

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;

public class PlayerMovement : NetworkBehaviour {

	private Rigidbody2D rb2d;
	private float moveSpeed;
	private Camera cam;

	void Start () 
	{
		if (isLocalPlayer) 
		{
			cam = this.transform.GetChild (0).GetComponent<Camera> ();
			cam.enabled = true;
		}

		rb2d = gameObject.GetComponent<Rigidbody2D> ();
		moveSpeed = 100.0f;
	}

	void Update () 
	{
		float horizontal = Input.GetAxis ("Horizontal") * moveSpeed;
		float vertical = Input.GetAxis ("Vertical") * moveSpeed;

		rb2d.AddForce (Vector2.right * horizontal);
		rb2d.AddForce (Vector2.up * vertical);

		Vector2 mousePos = cam.ScreenToWorldPoint (new Vector2 (Input.mousePosition.x, Input.mousePosition.y));

		float AngleRad = Mathf.Atan2 (mousePos.y - transform.position.y, mousePos.x - transform.position.x);
		float angle = (180 / Mathf.PI) * AngleRad;

		rb2d.rotation = angle;
	}
}

the script works okay except for the last part that deals with rotating the character, the character wont rotate to follow the mouse pointer, the strange thing is that this script has worked before (albeit on older versions of unity) but has chosen to break now,

What do I need to do to get the character following the mouse pointer?

here is the characters components in the inspector if that helps.

You should rotate the gameObject itself, not the rigidbody.
Also the rotation is generally a Vector3 value (x, y, z-value). You try to assign a single float to the rotation, not a Vector value. Since you have a 2D game, I guess the axis you want to rotate around is the z-axis and your visible plane is the x and y-axis?

Then simply replace line 37 with this:

transform.rotation = new Vector3(0, 0, angle);