Need help with gui text next to mouse

So for my script i just want to have my gui text show up right under the mouse cursor. The way I have it right now it just moves the text to the bottom right corner.
My Code:
messageSystem.transform.position = mainCamera.GetComponent().ScreenToViewportPoint(Input.mousePosition);
message system is a Text variable and mainCamera is a Game Object.

hey ;
u set it to mouse position ;

so u just need to create a new vector3 and modify the mouse position inside it

like this :

Vector3 UpRightMouse = new vector3(Input.mousePosition.X +3 , Input.mousePosition.Y + 5 , Input.mousePosition.Z);

SO i changed the x and y by 3 and 5 and set it based on input mouse position ;

then u can use it in your code :

messageSystem.transform.position = mainCamera.GetComponent().ScreenToViewportPoint(UpRightMouse );