austy3
|
  |
| Joined: 16 Feb 2011 |
| Total Posts: 66 |
|
|
| 03 Jul 2014 07:21 PM |
| I am trying to make a game and i need a script that will delete a block if it is like not welding to anything and you can push around. Please help. |
|
|
| Report Abuse |
|
|
Vuva
|
  |
| Joined: 22 Jan 2010 |
| Total Posts: 1102 |
|
|
| 03 Jul 2014 07:27 PM |
| Can you try rephrasing it / add more details? I can't understand exactly what you're asking... |
|
|
| Report Abuse |
|
|
austy3
|
  |
| Joined: 16 Feb 2011 |
| Total Posts: 66 |
|
|
| 03 Jul 2014 07:30 PM |
| Like if a block gets blown up from a timebomb the block will get deleted but can still regan. |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 03 Jul 2014 07:49 PM |
Sooo....
function findparts(model) for i, v in pairs(model:children()) do if v:IsA"BasePart" and #v:GetConnectedParts()==0 and not v.Anchored then v:Destroy() elseif #v:children()>0 then findparts(v) end end end
findparts(workspace) |
|
|
| Report Abuse |
|
|
austy3
|
  |
| Joined: 16 Feb 2011 |
| Total Posts: 66 |
|
| |
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 03 Jul 2014 07:56 PM |
| throw that frikin thing in a while loop. |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2014 07:59 PM |
I wonder if he knows how.
~I like trees |
|
|
| Report Abuse |
|
|
austy3
|
  |
| Joined: 16 Feb 2011 |
| Total Posts: 66 |
|
| |
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 03 Jul 2014 08:07 PM |
| if you dont know what a while loop is im no longer helping |
|
|
| Report Abuse |
|
|
austy3
|
  |
| Joined: 16 Feb 2011 |
| Total Posts: 66 |
|
|
| 03 Jul 2014 08:12 PM |
I know what a while loop is but i just don't know what to do like
while something do then your script here |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2014 08:14 PM |
while true do -Insert rest here- wait(#) end You're welcome |
|
|
| Report Abuse |
|
|