Create new plane and Raycast in C#?

Hello I am trying to translate a script im using from Javascript to C# as i need it to talk to other c# scripts I’ve made and I will be using mainly C# for the rest of the game.
I’ve attempted to translate them, the rest of the script is fine, its just two lines that I am stuck with. So I assume it is meant to be Ray ray. I’m just not sure.

		playerPlane = new Plane(Vector3.forward, transform.position);
		Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
		float hitdist = 0.0;
		if (playerPlane.Raycast (ray, hitdist)) {
			clickPosition = ray.GetPoint(hitdist);

Here is what they were before

	var playerPlane = new Plane(Vector3.up, transform.position);
	var ray = Camera.main.ScreenPointToRay (Input.mousePosition);

Give this a go!

  Plane playerPlane = new Plane(Vector3.up, transform.position);
  Ray ray = new Ray(Camera.main.transform.position, Input.mousePosition);

I didn’t get any errors so far so I hope this fixes what ever issue you where having!