Adamnet
|
  |
| Joined: 08 Oct 2007 |
| Total Posts: 7673 |
|
|
| 08 Aug 2011 02:41 PM |
So i got this script fixed up but the issue is it only does it to one block in the group not all of them.
while true do wait(1) if script.Parent.Fall.Value == 1 then print("Works") wait(1) local bricks = script.Parent.Lemon:GetChildren() for i=1,#bricks do if (bricks[i].Name == "Lemon") then model = bricks[i]:Clone() wait(1) bricks[i].Anchored = false wait (7) model.Parent = script.Parent.Lemon end end
script.Parent.Fall.Value = 0 end end
I want all blocks in Lemon to unanchor |
|
|
| Report Abuse |
|
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 08 Aug 2011 02:54 PM |
cool story, bro wiki.roblox.com/
:3 My spelling kills off noobs. |
|
|
| Report Abuse |
|
|
Adamnet
|
  |
| Joined: 08 Oct 2007 |
| Total Posts: 7673 |
|
|
| 08 Aug 2011 03:06 PM |
| nonono i meant something wrong with my script i put what was wrong i wondered if anyone knew what i did wrong |
|
|
| Report Abuse |
|
|
Adamnet
|
  |
| Joined: 08 Oct 2007 |
| Total Posts: 7673 |
|
|
| 08 Aug 2011 03:50 PM |
| Bump.. Can i please get some halp :( |
|
|
| Report Abuse |
|
|
Adamnet
|
  |
| Joined: 08 Oct 2007 |
| Total Posts: 7673 |
|
|
| 08 Aug 2011 04:31 PM |
| Pwese? I really need this to complete stage 1 of something im working on |
|
|
| Report Abuse |
|
|
Biostream
|
  |
| Joined: 28 Mar 2011 |
| Total Posts: 913 |
|
|
| 08 Aug 2011 04:36 PM |
for i, v in pairs(script.Parent.Lemon:GetChildren()) do v.Name="Lemon" --other stuff end |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2011 04:51 PM |
| for i, v in pairs(script.Parent.Lemon:children()) do if v.className == "Part" then v.Anchored = false end end |
|
|
| Report Abuse |
|
|
Adamnet
|
  |
| Joined: 08 Oct 2007 |
| Total Posts: 7673 |
|
|
| 08 Aug 2011 04:51 PM |
while true do wait(1) if script.Parent.Fall.Value == 1 then print("Works") wait(1) -- local bricks = script.Parent.Lemon:GetChildren() -- for i=1,#bricks do -- if (bricks[i].Name == "Lemon") then for i, v in pairs(script.Parent.Lemon:GetChildren()) do v.Name="Lemon" model = v[i]:Clone() wait(1) v[i].Anchored = false wait (7) model.Parent = script.Parent.Lemon end end script.Parent.Fall.Value = 0 end
Mon Aug 08 17:50:21 2011 - 1 is not a valid member of Part Mon Aug 08 17:50:21 2011 - Script "Workspace.Field.Tree1.Script", Line 11 Mon Aug 08 17:50:21 2011 - stack |
|
|
| Report Abuse |
|
|
Adamnet
|
  |
| Joined: 08 Oct 2007 |
| Total Posts: 7673 |
|
|
| 08 Aug 2011 04:56 PM |
| @Eletric yours did work but dropped 1 at a time(Randomly wich is nice) but the new one it cloned does not anchor, thats probably my fault if you can help please do. |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2011 04:57 PM |
... Adam, does it say anywhere in his script that it's gonna anchor? No. |
|
|
| Report Abuse |
|
|
| |
|
Adamnet
|
  |
| Joined: 08 Oct 2007 |
| Total Posts: 7673 |
|
|
| 08 Aug 2011 04:59 PM |
while true do wait(1) if script.Parent.Fall.Value == 1 then print("Works") wait(1)
for i, v in pairs(script.Parent.Lemon:children()) do if v.Name == "Lemon" then model = v:Clone() wait(1) v.Anchored = false wait (7) model.Parent = script.Parent.Lemon script.Parent.Fall.Value = 0 end end end end
I want the clone to anchor without having to put v.Anchor = true.. I guess i might have too haha |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2011 05:06 PM |
| It drops 1 at a time because of the long waits you have in the loop. ._. |
|
|
| Report Abuse |
|
|
Adamnet
|
  |
| Joined: 08 Oct 2007 |
| Total Posts: 7673 |
|
|
| 08 Aug 2011 05:18 PM |
I really wanted them all to drop at once. Heres what i want it to do:
Fall changes to 1 triggering the script(As seen) Lemon Models are backed up(For respawning) All the Lemon models in Lemon Group fall (Unanchor) The script waits 20 seconds before respawning the lemons (I set it to less but it will be more) Fall changes back to 0
Im abit rusty at this since ive just returned but i thank you for helping me. |
|
|
| Report Abuse |
|
|
|
| 08 Aug 2011 05:19 PM |
while true do wait(1) if script.Parent.Fall.Value == 1 then print("Works") wait(1) local lemons = script.Parent.Lemon:clone() for i, v in pairs(script.Parent.Lemon:children()) do if v.Name == "Lemon" then v.Anchored = false end end wait(7) for i, v in pairs(lemnos:children()) do v.Parent = script.Parent.Lemon end script.Parent.Fall.Value = 0 end end |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
| |
|
Adamnet
|
  |
| Joined: 08 Oct 2007 |
| Total Posts: 7673 |
|
|
| 08 Aug 2011 05:25 PM |
| It works thank you very much! |
|
|
| Report Abuse |
|
|