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 Help Please

Previous Thread :: Next Thread 
Adamnet is not online. 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 is not online. 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 is not online. 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 is not online. Adamnet
Joined: 08 Oct 2007
Total Posts: 7673
08 Aug 2011 03:50 PM
Bump.. Can i please get some halp :(
Report Abuse
Adamnet is not online. 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 is not online. 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
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
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 is not online. 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 is not online. 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
ScriptDrone is not online. ScriptDrone
Joined: 24 Jun 2010
Total Posts: 64
08 Aug 2011 04:57 PM
...
Adam, does it say anywhere in his script that it's gonna anchor?
No.
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
08 Aug 2011 04:58 PM
Lemme see how you put it.
Report Abuse
Adamnet is not online. 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
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
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 is not online. 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
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
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 is not online. nightname
Joined: 10 Jun 2008
Total Posts: 8960
08 Aug 2011 05:25 PM
That title is.. heh.
Report Abuse
Adamnet is not online. Adamnet
Joined: 08 Oct 2007
Total Posts: 7673
08 Aug 2011 05:25 PM
It works thank you very much!
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