Calling a fuction to other Script

Hello guys. I am pretty new in Unity and I am trying to solve how to connect a function from “CharacterController” script to “LightAnimation” script.
So basically what I want is, when I press Attack (or action button which is left mouse) near the pillar, the pillar lights turning on to unlock a bridge.
That’s what I’ve got so far:


Then, I’ve got that script for the character attack:
7540690--931450--player attack.JPG
Dont know if the character script I’m showing is enough, but if it’s not, just tell me and I will upload more script codes from the character.

Thank you so much for your help!!!

Ok, I’ve sorted out this one by myself. In the PillarLight script, I just made a call for a Input KeyCode:
public void OnTriggerEnter2D(Collider2D collision)
{
if(Input.GetKey(KeyCode.Mouse0))
{
LightOn.SetActive(true);
LightOff.SetActive(false);
}
}
And works very well, light I want. But I still have an issue: the idea is, when the PillarLight is on, a bridge appear.
So, I need to create a brigde first with collision and script, so inside the bridge script, what can I do to call the script of the Pillar when the lights are on?