title: error CS1061: 'GameObject' does not contain a definition for 'localPosition'
body: <p>H, I'm going to develop a drag and drop game with unity but this error appears, how to fix this error, please!</p>
  <p>this is the full error
  ( error CS1061: 'GameObject' does not contain a definition for 'localPosition' and no accessible extension method 'localPosition' accepting a first argument of type 'GameObject' could be found (are you missing a using directive or an assembly reference?))</p>
  <p><a href="https://i.stack.imgur.com/Pk6CK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Pk6CK.png" alt="this is the full error" /></a></p>
  <p>this is my code in the C# script</p>
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class MoveSystem : MonoBehaviour
  {
  
      public GameObject correctForm; 
      
      private bool moving; // to check if it is moving or not 
      private float startPosX; 
      private float startPosY; 
  
  
      // Start is called before the first frame update
      void Start()
      {
          
      }
  
      // Update is called once per frame
      void Update()
      {
          if(moving){
              Vector3 mousePos; 
              mousePos= Input.mousePosition; 
              mousePos = Camera.main.ScreenToWorldPoint(mousePos); 
  
              this.gameObject.transform.localPosition = new Vector3(mousePos.x - startPosX, mousePos.y - startPosY, this.gameObject.localPosition.z);
          }
          
      }
  
  
      public void OnMouseUp(){
  
          moving = false; 
  
      } 
  
  
      public void OnMouseDown(){
  
          if (Input.GetMouseButtonDown(0))
          {
              Vector3 mousePos; 
              mousePos = Input.mousePosition;
              mousePos = Camera.main.ScreenToWorldPoint(mousePos); 
  
              startPosX = mousePos.x - this.transform.localPosition.x;
              startPosY = mousePos.y - this.transform.localPosition.y; 
  
              moving = true; 
  
          }
      }
  }
   
  </code></pre>