Button1Up (Event): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>" |
m Text replacement - "<SyntaxHighlight code="lua">" to "<syntaxhighlight lang="lua">" |
||
Line 9: | Line 9: | ||
{{Example| | {{Example| | ||
This code, if put in an [[HopperBin]] would print <samp>Left mouse button is in up state.</samp> whenever the left mouse button is released: | This code, if put in an [[HopperBin]] would print <samp>Left mouse button is in up state.</samp> whenever the left mouse button is released: | ||
< | <syntaxhighlight lang="lua"> | ||
script.Parent.Selected:connect(function(mouse) | script.Parent.Selected:connect(function(mouse) | ||
mouse.Button1Up:connect(function() | mouse.Button1Up:connect(function() |
Latest revision as of 06:16, 27 April 2023
Example
This code, if put in an HopperBin would print Left mouse button is in up state. whenever the left mouse button is released:
script.Parent.Selected:connect(function(mouse)
mouse.Button1Up:connect(function()
print('Left mouse button is in up state.')
end)
end)