Right. I have tried asking many many people how to do this script and no one seems to get what it is I mean. Basically I want this to be a valid script
Which frustratingly it isn't. I want the mainCamera x and y co-ordinates to equal the x and y coordinates of the mouse cursor. It should be simple but it has given me a lot of difficulty.
I do have a script that almost works but I don't think I'm going in the right direction so I'm not going to put it up because it just confuses people usually.
Input.mousePosition is a Vector3 already....
in C# (C# scripts must be named the same as their class name, in this example CamMouse)
or, for fun and syntax similar to yours, in C#
Also, note that Input.mousePosition goes between (0,0,0) in the lower left corner, to (Screen.Width, Screen.Height, 0) in the upper right.