2D Arm won't Rotate

Hi. In my 2d platformer, I have it set to where the player’s body faces the direction it is moving in while the arm points towards the mouse but so far I can’t get my arm script to work right.

using UnityEngine;
using System.Collections;

public class ArmRotation : MonoBehaviour {

	public int rotationOffset = 0;

	// Update is called once per frame
	void Update () {
		// subtracting the position of the player from the mouse position
		Vector3 difference = Camera.main.ScreenToWorldPoint (Input.mousePosition) - transform.position;		
		difference.Normalize ();		// normalizing the vector, this meaning that the sum of the vector will be equal to 1.

		float rotZ = Mathf.Atan2 (difference.y, difference.x) * Mathf.Rad2Deg;	// find the angle in degrees
		transform.rotation = Quaternion.Euler (0f, 0f, rotZ + rotationOffset);
	}
}

Solved it. If anyone else has this problem use this script.
using UnityEngine;
using System.Collections;

public class ArmRotation : MonoBehaviour {

	public int rotationOffset = 0;

	// Update is called once per frame
	void Update () {
		Vector3 mousePos = Input.mousePosition;
		Vector3 pos = Camera.main.WorldToScreenPoint(transform.position);
		mousePos = mousePos - pos;
		transform.rotation = Quaternion.Euler(new Vector3(0, 0, Mathf.Atan2(mousePos.y, mousePos.x) * Mathf.Rad2Deg - rotationOffset));
	}
}