Inventory system help - getMouseButtomDown problem

this is my code for items:

using UnityEngine;
using System.Collections;

public class Item : MonoBehaviour {

public Transform Inventoy;
public InventoryContoller IC;

void OnMouseEnter()
{
	Inventoy.GetComponent<InventoryContoller>().selectedItem = this.transform;
}

}

and this is the inventory controller
using UnityEngine;
using System.Collections;

public class InventoryContoller : MonoBehaviour {

public Transform selectedItem, selectedSlot, originalSlot;
public bool canGrab = false;

void Update () {
	if(Input.GetMouseButton(0) && selectedItem != null)
	{
		selectedItem.position = Input.mousePosition;
	}
	else if(Input.GetMouseButtonUp(0) && selectedItem != null)
	{
		selectedItem.localPosition = Vector3.zero;
	}
}

}

i dont know why, but thats dont work…
can someone help me?
the inventory controller dont even get the transform from the item script

Try if that works

using UnityEngine.EventSystems;

public class Item : MonoBehaviour, IPointerEnterHandler
 {

 public Transform Inventoy;
 public InventoryContoller IC;
 
 public void OnPointerEnter(PointerEventData eventData)
 {
     Inventoy.GetComponent<InventoryContoller>().selectedItem = this.transform;
 }

}

OnMouseEnter method works only for object with colliders/GUI elements - make sure you have it attached to your object. You may also find some help here: Redirect to... title of new-page