|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 10 Jun 2012 12:53 AM |
| Thankyou! You guys are great! |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 10 Jun 2012 01:14 AM |
| Each brick, unless You edit it to have a GetChildren() |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 11 Jun 2012 01:18 PM |
| Mega, he did the same thing to me, too in another post. XD. |
|
|
| Report Abuse |
|
|
| |
|