Turret turn angle clamp

So my problem is I have a turret that should only be able to turn at max 45 degrees in either direction(left to right)
however the angle is always wrong and changes depending on where I place the turret.

Anyone know how I can fix this? here is my current code.

Ya that didnt work, on one hand a turret placed in a level with no rotation adjustments turns 45 degrees to the right but won’t even turn to the left at all. I placed other turret which faced the opposite direction as the first one and it turned completely backwards but matched the angle of the first. Is there any way to limit the degree of turning to 45 degrees based on its current default rotation it had on map startup? That why I don’t have to make a new blueprint for each turret I place on a map. Thanks in advance.

I finally came up with a solution that works. Now turrets can be placed anywhere in a level and have their turn radius clamped based on their default rotation!!! I left the solution to my problem down below so if
anyone runs into this problem in the future they can use this code to help them.