cqRoy
(Royy)
December 3, 2020, 5:05pm
#1
So I’ve scripted a custom backpack UI, however, I would like to be able to change the position of the order of the tools (kinda like in the default Roblox backpack)
Example: https://gyazo.com/58cd30442a5f89a5e8e785c31fa1f308
Thank you for reading or even reading
(EDIT: I don’t need the inventory placing, already done)
5 Likes
You might want to make it so that it follows the mouse when held
cqRoy
(Royy)
December 3, 2020, 5:11pm
#4
Although it answered my question, I am making a custom backpack, any idea how I would do that draggable like roblox?
This is a fun one! Most of this answer will be links / ‘borrowed’ code since I don’t see the point in re-inventing the wheel.
Dragging a GUI
This shoudn’t be too difficult at all to implement in lua and was actually previously a built-in feature that was deprecated. As a general rule, you want to do what @nuttela_for1me suggested. Here is a module you can use or look at that attempts to replicate the draggable behaviour:
Detecting if a GUI is inside of an another
This requires a tiny bit of…
About
We used to have a property called Draggable which allowed us to enable dragging on GUI objects. Unfortunately this has been deprecated and is no longer available. That’s why I created an easy to use module to replace the old ‘Draggable’ property.
This module can be used on any GuiObject (Frames, ImageLabels, TextLabels, etc.) and supports both mouse and touch.
How To Use
First, you require the module and use DraggableObject.new(Object) function to create a new draggable object from a…
Whenever you ask a question the answer is probably out there you just need to do the right google searches
2 Likes