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: Brickremoval

Previous Thread :: Next Thread 
HuntHello is not online. HuntHello
Joined: 19 Jan 2011
Total Posts: 577
15 Aug 2012 07:20 PM
I cannot figure out a script that removes bricks that hit the script's parent.
I tried

function onTouched(hit)
hit:remove()
end
script.Parent.Touched:connect(onTouched)

But it only removes legs and other limbs, but does not removes bricks that it touches.

Please help me! Thanks!
Report Abuse
jmr11b is not online. jmr11b
Joined: 19 Aug 2010
Total Posts: 806
15 Aug 2012 07:31 PM
Wait its supposed to remove your player when you touch it?
Report Abuse
HuntHello is not online. HuntHello
Joined: 19 Jan 2011
Total Posts: 577
15 Aug 2012 07:38 PM
No, I want it to remove a falling ball when it touches the script's parent.

Thanks for help!
Report Abuse
jmr11b is not online. jmr11b
Joined: 19 Aug 2010
Total Posts: 806
15 Aug 2012 07:38 PM
Umm... if so do this:
function onTouch(hit)
hit.Parent:remove()
end
script.Parent.Touched:connect(onTouch)
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
15 Aug 2012 07:42 PM
Even better:

script.Parent.Touched:connect(function(hit)
hit.Parent:Destroy()()
end)

~2.9k posts/20k posts
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
15 Aug 2012 07:43 PM
Ooops, added an extra () on accident xD

script.Parent.Touched:connect(function(hit)
hit.Parent:Destroy()
end)

~2.9k posts/20k posts
Report Abuse
HuntHello is not online. HuntHello
Joined: 19 Jan 2011
Total Posts: 577
15 Aug 2012 07:48 PM
Thank you!!!!
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