wait(1)
local App = script.Parent
local Window = App.Window
local Over = App.Overlay
Window.Drag.MouseButton1Down:connect(function()
Over.Visible = true
local Move = Over.MouseMoved:connect(function(X,Y)
local x = X-Window.AbsolutePosition.X-(Window.Drag.Size.X.Offset/2)
local y = math.floor(((Y-(Window.Drag.Size.Y.Offset/2))/20)+0.5)*20
if x < 400 then x = 400 end
if y < 100 then y = 100 end
Window.Size = UDim2.new(0,x,0,y)
end)
local Up
local Leave
Up = Over.MouseButton1Up:connect(function()
Move:disconnect()
Up:disconnect()
Leave:disconnect()
Over.Visible = false
end)
Leave = Over.MouseLeave:connect(function()
Move:disconnect()
Up:disconnect()
Leave:disconnect()
Over.Visible = false
end)
end)
ok i fixed it by subtracting they y value by 13.6 so it will stay on the cursor
wait(1)
local App = script.Parent
local Window = App.Window
local Over = App.Overlay
Window.Drag.MouseButton1Down:connect(function()
Over.Visible = true
local Move = Over.MouseMoved:connect(function(X,Y)
local x = X-Window.AbsolutePosition.X-(Window.Drag.Size.X.Offset/2)+10
local y = math.floor(((Y-(Window.Drag.Size.Y.Offset/2))/20)-13.6)*20
if x < 400 then x = 400 end
if y < 100 then y = 100 end
Window.Size = UDim2.new(0,x,0,y)
end)
local Up
local Leave
Up = Over.MouseButton1Up:connect(function()
Move:disconnect()
Up:disconnect()
Leave:disconnect()
Over.Visible = false
end)
Leave = Over.MouseLeave:connect(function()
Move:disconnect()
Up:disconnect()
Leave:disconnect()
Over.Visible = false
end)
end)
so if anyone else is having this problem here is the code and all you do is subtracting or adding till it looks nice