MouseClick (Event)
From Legacy Roblox Wiki
Jump to navigationJump to search
![]() | |
Description | Fired after the ClickDetector's parent is clicked. |
---|---|
Member of: | ClickDetector |
Example
This code would print Part was clicked by: , followed by the name of the player who clicked the part, whenever it is clicked.
Workspace.Part.ClickDetector.MouseClick:connect(function(playerWhoClicked)
print("Part was clicked by: " .. playerWhoClicked.Name)
end)