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: Clear all bricks inside of this brick?

Previous Thread :: Next Thread 
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
17 Jan 2013 06:01 PM
I can't think of a way to do this... I have one brick and any bricks inside of it I want to be cleared.. any ideas? could I use :touched?
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
17 Jan 2013 06:03 PM
script.Parent.Touched:connect(function()
script.Parent:ClearAllChildren()
end)

?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Jan 2013 06:19 PM


script.Parent.Touched:connect(function( )
  for i , v in pairs( script.Parent:GetChildren( ) ) do
    if v:IsA("BasePart") then
      v:Destroy( )
    end
  end
end)

¤ ¤ † K M X D † ¤ ¤
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
17 Jan 2013 06:23 PM
no i mean if they are physically inside of the brick.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Jan 2013 06:28 PM
Would they have the exact same positions?

¤ ¤ † K M X D † ¤ ¤
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
17 Jan 2013 06:34 PM
"no i mean if they are physically inside of the brick."
Everything in workspace is physical, except scripts, and some other classes. But bricks are physical. If you put Knightmare's script inside of the brick you want all bricks to be cleared out then it should work.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Jan 2013 06:36 PM
No, I think I know what he's talking about. I'm currently experimenting with magnitude.

¤ ¤ † K M X D † ¤ ¤
Report Abuse
LUVMARIOLUIGI10000 is not online. LUVMARIOLUIGI10000
Joined: 16 May 2009
Total Posts: 1244
17 Jan 2013 06:58 PM
I doubt it. No offence to him, but I doubt he knows how to use magnitude. I could be wrong though.

~LUV, LuaLearners Teacher(+3)~
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
18 Jan 2013 09:32 AM
"Would they have the exact same positions?"

No.

I have a base plate which one player can build on.. I want to have a clear button so he/she can clear all the bricks ONLY ON THAT BASE PLATE
Report Abuse
ultralegomaster5096 is not online. ultralegomaster5096
Joined: 17 Jan 2011
Total Posts: 4351
18 Jan 2013 10:04 AM
Region3s?
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
18 Jan 2013 05:58 PM
"Region3s?"

what?
Report Abuse
ultralegomaster5096 is not online. ultralegomaster5096
Joined: 17 Jan 2011
Total Posts: 4351
18 Jan 2013 06:35 PM
http://wiki.roblox.com/index.php/Region3

http://wiki.roblox.com/index.php/FindPartsInRegion3

for _,v in pairs(partsInRegion3) do
v:Destroy()
end
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