Fantasy
|
  |
| Joined: 25 Oct 2007 |
| Total Posts: 43 |
|
|
| 20 Feb 2016 06:46 PM |
If I had a LocalScript in my player and I wanted to make it so that when I click any ClickDetector it deletes the ClickDetector's Parent. How would I do it?
thanks |
|
|
| Report Abuse |
|
|
Fantasy
|
  |
| Joined: 25 Oct 2007 |
| Total Posts: 43 |
|
| |
|
3DReality
|
  |
| Joined: 08 Mar 2015 |
| Total Posts: 150 |
|
|
| 20 Feb 2016 08:09 PM |
local mouse = game:GetService("Players").LocalPlayer:GetMouse() mouse.Button1Down:connect(function() wait() if mouse.Target then if mouse.Target:FindFirstChild("ClickDetector") ~= nil then if mouse.Target ~= nil then mouse.Target:Destroy() end end end end)
This is a local script inside player gui |
|
|
| Report Abuse |
|
|