UIListLayout help

I have this Hotbar UI:


i want to be able to drag a frame to and spot and even playing a little animating. i just get the points in between the dragging stops and stuff. the actual implementation and animation is easy.

my question is how do u seemlessly “pick up” an item and drag and even put it back? all while the frames are in ui list layout

any help would be great!!1

1 Like

Now I won’t be able to provide any code snippets but I could at least give you an idea of what you could do.

One solution would be when they click & hold one of the items in the hotbar it clones the frame or whatever into a different individual frame that you can position freely with the mouse along the X axis then the actual frame on the hotbar you will still want there but have its contents be hidden to make it seem interactive. Then as the user drags the frame along the X axis you will need to do some math to figure out where the frame is so you can update the invisible frames layout order to match the order the mouse is in.

^ kind of an idea of what I mean above but with roblox studio and UIListLayouts you won’t be able to get the animations of the other items moving around it’ll just kind of snap into place but the item you are dragging you can at least do some stuff with that.

External Media

Or alternatively you can kind of do what this game does and copy the frame and which ever frame they drop on it’ll basically just swap the two instead of squeezing it in.
SOULS: Hotbar drag & drop

2 Likes