Hello, I’m trying to make an inventory system. I made the system move the item and drop but the frame is not in the same position as my mouse. Can anyone help?
I’m gonna take a guess and assume your issue is because you aren’t taking into account the offset from GuiInset at the top of the screen. There’s a simple way you can get the true position like this:
local GuiService = game:GetService("GuiService")
local offset = GuiService:GetGuiInset()
local mousePosition = Vector2.new(Mouse.X, Mouse.Y) - Vector2.new(0,offset.Y)
Hope this helps! If you have any questions feel free to ask.