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: Script that makes blocks go away?

Previous Thread :: Next Thread 
whereiswaldo144 is not online. whereiswaldo144
Joined: 05 Apr 2012
Total Posts: 14
09 Jun 2012 02:26 PM
Im making a world that involves a lot of little blocks being blown off buildings, basiclly what im in need of is a script that makes the blocks that have been blown off dissaper off the ground to majorly reduce lag. Where can I find a script like that?
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
09 Jun 2012 02:43 PM
while wait() do
for i,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("BasePart") or v.ClassName == "Model" then v:Destroy() end
end

:P XD.
Report Abuse
whereiswaldo144 is not online. whereiswaldo144
Joined: 05 Apr 2012
Total Posts: 14
09 Jun 2012 03:57 PM
:o that works?
Report Abuse
Megamatrixdude is not online. Megamatrixdude
Joined: 06 Dec 2009
Total Posts: 10939
09 Jun 2012 04:02 PM
Put this in the base where everything will fall on to:

script.Parent.Touched:connect(function(h)
if not h.Parent:FindFirstChild("Humanoid") then
h:Destroy()
end
end)
Report Abuse
whereiswaldo144 is not online. whereiswaldo144
Joined: 05 Apr 2012
Total Posts: 14
09 Jun 2012 04:13 PM
I use a series of roads, so i just select all the roads and put the script into them? because thats whre a majority of the blocks will fall on.
Report Abuse
bananacupcake is not online. bananacupcake
Joined: 15 Jun 2010
Total Posts: 571
09 Jun 2012 04:22 PM
Well the problem with checking to see if the brick touching another brick is not a humanoid is that other bricks can touch that brick. What I mean is there might be blocks that you don't want to be destroyed being destroyed. Try naming all the blocks you want to be destroyed, and checking to see if the block is that name.

Report Abuse
whereiswaldo144 is not online. whereiswaldo144
Joined: 05 Apr 2012
Total Posts: 14
09 Jun 2012 05:41 PM
I just want bricks to be gone, not humanoids, just bricks.... weapons i dont mind either, they can leave or stay.
Report Abuse
whereiswaldo144 is not online. whereiswaldo144
Joined: 05 Apr 2012
Total Posts: 14
09 Jun 2012 05:50 PM
Ok that one scipt above me works perfectly. ALtho the bricks do dissaper kinda quick, is there a line of script i can put that adds liek a 10 second delay before the blocks dissappear?
Report Abuse
QU1NTESSENCE is not online. QU1NTESSENCE
Joined: 03 Jun 2012
Total Posts: 72
09 Jun 2012 05:54 PM
script.Parent.Touched:connect(function(h)
if not h.Parent:FindFirstChild("Humanoid") then
wait(10)
h:Destroy()
end
end)
Report Abuse
whereiswaldo144 is not online. whereiswaldo144
Joined: 05 Apr 2012
Total Posts: 14
10 Jun 2012 12:53 AM
Thankyou! You guys are great!
Report Abuse
whereiswaldo144 is not online. whereiswaldo144
Joined: 05 Apr 2012
Total Posts: 14
10 Jun 2012 01:13 AM
Wait last question, so i applied the script to a section of the road, now wehn i copy and paste that section will the copied sections share the same script? or do i have to apply it to each section individualy?
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
10 Jun 2012 01:14 AM
Each brick, unless You edit it to have a GetChildren()
Report Abuse
Megamatrixdude is not online. Megamatrixdude
Joined: 06 Dec 2009
Total Posts: 10939
11 Jun 2012 10:57 AM
@Qu1n

You just copied MY script from MY post.

If you want to help don't just spam copies of other people's work to look semi-intelligent.
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
11 Jun 2012 01:18 PM
Mega, he did the same thing to me, too in another post. XD.
Report Abuse
Redboy1124 is not online. Redboy1124
Joined: 12 Sep 2010
Total Posts: 541
11 Jun 2012 01:22 PM
Thats a little confusing
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