Custom inventory help

So I am making a custom inventory UI,
you can use the keys to equip a tool.
but I don’t know how I would go about scripting the ` UI? where I can switch tools with the hotbar, search, etc. Let me know if the script is needed for further assistance.

Do you mean dragging tools? I made something similar a while ago.

For the dragging thing there used to be a Draggable property, but it’s now deprecated. You can instead use the mouse to do this.

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()

local Frame = script.Parent:WaitForChild("Frame")

    local X = Mouse.X
    local Y = Mouse.Y
    Frame.Position = UDim2.fromOffset(X, Y)

Now going to knowing in which slot should the tool go you can detect the distance between every slot by using its AbsolutePosition, if it is too far just return it to the initial position.

local Distance = (Tool.AbsolutePosition-Slot.AbsolutePosition).Magnitude
1 Like

Could you help implement this to my script? I’m not sure where to get started on this