I'm trying to make a gui where if I double click within a span of 1s, it would do something else. I tried using this script, but it doesn't really work that well.
button.MouseButton1Click:Connect(function() local wantTo = true button.MouseButton1Click:Connect(function() if wantTo == true then --Double click script end end) wait(1) wantTo = false --Single click script end)
MouseButton1Click
eventlocal counter = 0 button.MouseButton1Click:Connect(function() counter = counter + 1 if counter == 2 then -- Code end end)