How would i detect the difference between the mousebutton being held down and the mousebutton being clicked. I have an item slot and i want it so when i click the slot, a menu appears, but when i hold it, i’m able to drag it. How would i achieve this?
local holding = false
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Button1Down:Connect(function()
if holding then
holding = false
end
end)
mouse.Button1Down:Connect(function()
if not holding then
holding = true
end
end)
while holding do
-- while holding to something
wait()
end