Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Making a drag/drop inventory?

local mbd = false --mb1 = Mouse Button Down
for i,v in pairs(script.Parent.Inventory) do
	v.ImageButton.MouseButton1Down:connect(function()
		mbd = true
		v.Draggable = true
	end)
	v.ImageButton.MouseButton1Up:connect(function()
		mbd = false
		v.Draggable = false
	end)
end

I am trying to make a drag/drop inventory system, but once I started coding it, I realized I have no clue on how to do it exactly. I want to make it so when the player clicks and holds on the slot it can be dragged and when dropped, if hovered above another slot it will replace the slot otherwise it returns to the previous slot spot. How can I do this?

1 comment

0

Draggable is deprecated.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.