generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

help

Previous Thread :: Next Thread 
Fantasy is not online. 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 is not online. Fantasy
Joined: 25 Oct 2007
Total Posts: 43
20 Feb 2016 07:59 PM
bump
Report Abuse
3DReality is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image