generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Difference between MouseButton1Down and MouseButton1Click?

Previous Thread :: Next Thread 
Dodeca is not online. Dodeca
Joined: 11 Sep 2011
Total Posts: 13649
17 Jun 2014 06:51 PM
?
Report Abuse
RobloxianDrawer1 is not online. RobloxianDrawer1
Joined: 28 May 2011
Total Posts: 79
17 Jun 2014 06:52 PM
Click is a full click, down is when you press the mouse button down
Report Abuse
RobloxianDrawer1 is not online. RobloxianDrawer1
Joined: 28 May 2011
Total Posts: 79
17 Jun 2014 06:53 PM
so you can do this


local down = false
function poop()
while not down do
instance.new"poop"
wait()
end
end

gui.MouseButton1Down:connect(function()
down = not down
end)

gui.MouseButton1Click:connect(function()
down = not down
end)
Report Abuse
SuperiorEternal is not online. SuperiorEternal
Joined: 22 Aug 2009
Total Posts: 2365
17 Jun 2014 07:25 PM
Ok so here it is:

MouseButton1Click - So when you click with the left button of your mouse, this API is called and it recognizes it, as a click. So the API doesn't loop. It just applies your code every time you click.

MouseButton1Down - This API is called when you click the button and hold it down. For example in a video game: The hold down the left button on the mouse, it would shoot a rocket repeatedly; where as with MouseButton1Click it would only shoot once.
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
17 Jun 2014 07:29 PM
Click is when your mouse button goes Down and Up without leaving the region.

Down is just for when it goes down.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image