How do I pull a script from a collider that my object is in?

I have a car that pulls up to an intersection. And then it is suppose to pull from the intersection collider what radius to turn at to make a proper turn. How do I code to pull that script from the collider?

I think it is along the lines of this but this is as far as I could get

intersectionScript3Way = other.GetComponent(MonoScript).IntersectionScript;

intersectionScript3Way being my variable inside the car script
other is the collider with the script on it
IntersectionScript is the script im trying to pull.

It’s almost right:

function OnTriggerEnter(other: Collider){
  // try to get the IntersectionScript from the trigger:
  var interScript: IntersectionScript = other.GetComponent(IntersectionScript);
  if (interScript){ // if script found, get the variable you want:
    intersectionScript3Way = interScript.theVariableYouWant;
  }
}