|
| 13 Oct 2013 06:37 PM |
Hi,
So I'm using a LocalScript and GetMouse to trigger the player Clicking without a tool:
local player = game.Players.LocalPlayer local mouse = player:GetMouse
mouse.Button1Down:connect(function() --blahblahblah end)
I need to check if the Player is clicking a brick by a specific name. How would I do this? |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 13 Oct 2013 06:39 PM |
local player = game.Players.LocalPlayer local mouse = player:GetMouse() -- Forgot some parentheses
mouse.Button1Down:connect(function() if mouse.Target.Name == "Whatever the brick's name is" then print("The correct brick was clicked!") end end) |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2013 06:39 PM |
mouse.Button1Down:connect(function(clicked) if clicked.Name == "BLAH" then --Code end end)
Maybe?
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|