How to detect single mouse clicks
Jump to navigation
Jump to search
wasDown = false
while true // press Control-C to exit
isDown = mouse.button
if isDown and not wasDown then
print "Mouse button clicked!"
end if
wasDown = isDown
yield
end while