Im working on a few GUIs and im struggling to actually make them draggable due to the new update. Can anyone help?
COMMUNITY QUESTION
I'm struggling to make my GUIs draggable. Can anyone help?
1 answer
Try this
local runService = game:GetService("RunService)
local mouse = game.Players.LocalPlayer:GetMouse()
local isDown = false
local function MoveUI()
if isDown then
script.Parent.Position = UDim2.new(0, (mouse.X), 0, mouse.Y) -- moves the UI
end
end
mouse.Button1Down:Connect(function()
isDown = true -- Switch to true
end)
mouse.Button1Up:Connect(function()
isDown = false -- Switch to false
end)
runService:BindToRenderStep("Input", Enum.RenderPriority.Input.Value, MoveUI) -- Calls the function
This should would but you may have to subtract of add a value to the Y position to center it on your mouse.
Untested by the way. Hope this helps!
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
you can still set gui's to draggable via script, although most people prefer to make their own systems
Draggable is deprecated and it wasn't even working properly.
what kind of guis are you working with?
actually just found this link that might be able to help you out, it has an example on it: https://devforum.roblox.com/t/draggable-property-is-hidden-on-gui-objects/107689/5