How to access a script/script value from the GameObject

Sorry if this has been answered before, or if its just a dumb question in general.
I can’t find anything related to it…

Here is my issue. Say I have a camera with the default Tilt Shift script, and when I aim my sights down, it increases the blur amount. They are both on the exact same GameObject. I know you can do some GetComponent tricks to get it, but how do I actually alter these values?

I assume I will have to create a second one with high blur, and just activate and deactivate it when aiming my sights. It would be nice if I could set-up some type of gradual change however.

So in general, I want to directly change a scripts value, from another script, on the exact same GameObject. I’m brand new, so sorry again if it’s simplistic and easy to do…

You could acces the Script “TiltShift” in your own Script for aiming. There you can just change the value of the blur area.

so you have to get the Script like this:

TiltShift ts = GetComponent<TiltShift>();

and then acces the value:

ts.blurArea = yourValue;

and thats it