Use this script. What it does is for example is it was facing a 140-degree angle it would do 180-140 which is 40. Now, if you press space, you will see an example.