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 » Scripting Helpers
Home Search
 

Re: Self Destruct

Previous Thread :: Next Thread 
alliancer is not online. alliancer
Joined: 18 Mar 2013
Total Posts: 1016
08 Sep 2013 09:24 PM
function tag()
wait(0.25)
script.Parent:Remove()
end

script.Parent.ClickDetector.MouseClick:connect(tag)

-- It's not throwing me any errors, but doesn't do anything either
-- Any ideas? Thanks
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
08 Sep 2013 09:31 PM
Do you have a click detector in the part?
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
08 Sep 2013 09:32 PM
Nvm, Ignore that. The script needs to be inside the click detector, Inside the brick, And you wanna do script.Parent.Parent:Destroy() I think
Report Abuse
alliancer is not online. alliancer
Joined: 18 Mar 2013
Total Posts: 1016
08 Sep 2013 09:34 PM
I'm pretty sure that only changes the position of the script & stuff
The problem is either connecting the function, or removing the brick
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
08 Sep 2013 09:37 PM
When you click it, The way you have it set up, Is to remove the Click Detector
Report Abuse
alliancer is not online. alliancer
Joined: 18 Mar 2013
Total Posts: 1016
08 Sep 2013 09:40 PM
I'm trying to remove the brick itself
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
08 Sep 2013 09:51 PM
Then do script.Parent.Parent:Destroy()
Report Abuse
HILLBILLYY is not online. HILLBILLYY
Joined: 08 May 2010
Total Posts: 764
08 Sep 2013 10:38 PM
function tag()
script.Parent:remove()
end

script.Parent.ClickDetector.MouseButton1Down:connect(tag)


should work fine
Report Abuse
HILLBILLYY is not online. HILLBILLYY
Joined: 08 May 2010
Total Posts: 764
08 Sep 2013 10:38 PM
p=Instance.new("ClickDetector")
p.Parent=script.Parent



lol easyer to use insert object
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
08 Sep 2013 10:48 PM
@HILL
Please just stop
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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