Hi, I have an inventory script where players drag around inventory items I’ll let you see the problem here. Notice how the gui’s Y position changes as the mouse position goes lower.
UI Testing - Roblox Studio 2022-07-23 23-57-32 (Video is messed up sorry)
I am using a heavily modified version of this script so here are the most important parts. How To Make A Draggable GUI? - #9 by MrchipsMa
local function update(input, gui)
local delta = input.Position - dragStart
gui.Position = UDim2.new(startPosX, -1.5 + delta.X, startPosY, delta.Y)
end
--later in the script
startPosX = mouse.X/mouse.ViewSizeX
startPosY = mouse.Y/mouse.ViewSizeY
I am parenting the GUI to the ScreenGui which in which it doesn’t matter whether IgnoreGuiInset enabled or disabled.
I just want it to go a little left of the mouse and while the startPosX works, the startPosY is just not working.
Thanks!