Button2DownConnectionCount (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>ArceusInator
New page: {{CatUp|Properties}} <onlyinclude>{{Property |name = Button2DownConnectionCount |property = Int ''Button2DownConnectionCount'' |description = Retu...
 
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>"
 
(17 intermediate revisions by 5 users not shown)
Line 3: Line 3:
<onlyinclude>{{Property
<onlyinclude>{{Property
|name                = Button2DownConnectionCount
|name                = Button2DownConnectionCount
|property            = [[Int]] ''Button2DownConnectionCount''
|property            = [[int]] ''Button2DownConnectionCount''
|description          = Returns the amount of times the right mouse trigger was connected by being pushed.
|description          = The amount of times the right mouse trigger was connected by being pushed.
|object              = PlayerMouse
|object              = PlayerMouse
|}}</onlyinclude>
|}}</onlyinclude>
 
{{clear floats}}
[[Category:Properties]]
{{Example|This example will only work if in a [[LocalScript]].<syntaxhighlight lang="lua">
 
game.Players.LocalPlayer.PlayerMouse.Changed:connect( function( property )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
{{Example|<pre>
game.Players.LocalPlayer.PlayerMouse.Changed:connect( function( playermouse, property )
   if property == "Button2DownConnectionCount" then
   if property == "Button2DownConnectionCount" then
       print( "The Player has pressed the Right Mouse Button " .. playermouse.Button2DownConnectionCount .. " times." )
       print( "The Player has pressed the Right Mouse Button " .. game.Players.LocalPlayer.PlayerMouse.Button2DownConnectionCount .. " times." )


   end
   end
end )</pre>}}
end )</syntaxhighlight>}}
 
[[Category:Properties]]

Latest revision as of 06:19, 27 April 2023

Button2DownConnectionCount
Property int Button2DownConnectionCount
Description The amount of times the right mouse trigger was connected by being pushed.
Member of PlayerMouse
Example
This example will only work if in a LocalScript.
game.Players.LocalPlayer.PlayerMouse.Changed:connect( function( property )
   if property == "Button2DownConnectionCount" then
      print( "The Player has pressed the Right Mouse Button " .. game.Players.LocalPlayer.PlayerMouse.Button2DownConnectionCount .. " times." )

   end
end )