Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How could I find the mouses position relative to the GUI it is over?

Asked by
Zeoic 40
7 years ago

I am making a GUI inventory type system, that allows you to move items around into different slots. You do this by clicking on the item slot, it will attach to your mouse and then you can click to place it back down in another slot. Currently I have just a static position for the GUI that is following the mouse, so when I pickup an item, it kind of "jumps" to that spot.

I need to think of a way to pickup the item into the mouse slot but in the exact same position of the inventory slot. To do this I need to know the mouses position relative to that slot GUI. I can not think of anyway I could do this, so any help would be awesome!

If there are any other questions as to what I am doing I will try best to answer them!

Thanks.

0
The AbsolutePostion X/Y of the GUI - the position X/Y of the mouse User#6546 35 — 7y
0
Thank you man you are a life saver. I had no idea this was a thing! Zeoic 40 — 7y

Answer this question