MouseClick (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Legend26
No edit summary
>JulienDethurens
Did some changes.
Line 8: Line 8:
{{clear floats}}
{{clear floats}}


{{Example|<pre>
{{Example|<code lua>
game.Workspace.Part.ClickDetector.MouseClick:connect(function(playerWhoClicked)
Workspace.Part.ClickDetector.MouseClick:connect(function(playerWhoClicked)
   print("Part was clicked by: " .. playerWhoClicked.Name)
   print("Part was clicked by: " .. playerWhoClicked.Name)
end)
end)
</pre>}}
</code>}}


[[Category:Events]]
[[Category:Events]]

Revision as of 03:06, 18 January 2012

MouseClick ( Player playerWhoClicked )
Description Fired after ClickDetector's parent is clicked.
Member of: ClickDetector


Example

Workspace.Part.ClickDetector.MouseClick:connect(function(playerWhoClicked)

 print("Part was clicked by: " .. playerWhoClicked.Name)

end)