How to call a method from a class in a different script in c#

I am working on a final for my Video Game Design course, and I am trying to make a double door slide open when a pressure plate is activated.

The pressure plate sctrip is

and the door is

the DoorLeft and DoorRight scripts are identical, but i can only upload two images. The only difference is that every instance of the word “Left” is replaced with “Right”. The numbers in the door script are currently placeholders.

When I try to run the program, I get the following error
“an object reference is required for the nonstatic field method or property ‘UnityEngine.Component.Transform.get’”

Does anyone know how to get this to work?

You have to remove “static” modifier from both functions and create instances of that doors in the beginning of script “Pressure Plate”. Type this after “public class […]” line:

public DoorLeft doorLeft;
public DoorRight doorRight;

Attach components (in Unity script is also component) to slots which will be available after declaring public variables. Then in “OnTriggerEnter” function before method call type “doorRight.DoorRightOpen ();” and so on. It should work.