Sprite point towards cursor

Hi! I’m making a point and click shooting platformer in which the mouse position shows where the bullets hit. I have made two separate sprites, the character and the gun. I want the gun to face the mouse, but stay in the same position on the character. I have it so the mouse appears on the screen, but have not got any further. Any suggestions?

230655-idk.png

!UPDATE! I’ve worked out some of the code (possibly), I just need to find a way to link the two sections.