How to position GUI right beside mouse at all times?

I want my gui to be positioned by my gui all th time when it is showing. Input.mousePosition isn’t working so do you guys have any other idea on how to do this?


void OnGUI()
	Vector2 mousePos = Event.current.mousePosition ;
	GUI.Box(new Rect(mousePos.x, mousePos.y, 150f, 50f), "BoxAtMousePos") ;