Whenever uidragdetector is on, you cannot select the textbutton

My goal is to make draggable slots for my inventory, so I used the UiDragDetectors. It works great, but the problem is that whenever it’s enabled, I cannot select the slot while it’s enabled.
Example: Whenever you open your inventory, all UIDragDetectors are enabled. This allows the player to drag the ui slots, but it causes them to not be able to equip or unequip the slots.

1 Like

I mean that’s expected. Anyways, yes it is true that Roblox disables GuiButtons when UIDragDetectors are enabled.
This is an easy fix however as you could just replace:

TextButton.MouseButton1Down:Connect() -- or TextButton.MouseButton1Click:Connect()
TextButton.MouseButton1Up:Connect()

with

TextButton.UIDragDetector.DragStart:Connect()
TextButton.UIDragDetector.DragEnd:Connect()
1 Like

I found out the solution, but now something happened. Whenever a tool is added, the order gets switched around. Btw, to fix the bug, I spent the last 2 hours on reworking the whole system.

Anyways, the uilistlayout is supposed to add the slots from left to right, not right to left. For example, when 3 items are added, the slot numbers are added randomly, such as 2 - 3 - 1, instead, I want 1 - 2 - 3. I have a picture that may help visualizing my problem.