Multiplying Vector2 value from another script?
So I am attempting to multiple a single variable from a Vector2 from another script than the one that calls the Vector2. Now I know how I would go about multiplying the entire vector, however I am having trouble just multiplying the x value of the Vector. Here is the script:
function OnMouseDown()
{
object1.GetComponent("TestScript").testingvector = Vector2.x * -1;
}
And I am recieving this error when using it:
BCE0020: An instance of type 'UnityEngine.Vector2' is required to access non static member 'x'.
What would I need to do?