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: Would this work?

Previous Thread :: Next Thread 
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
20 Feb 2013 06:35 AM
Please no comments that says why dont i test it.Thanks.

This script is supposed to regen the whole place (the parts).So it puts all the parts in lightning and back in workspace but before it puts back in workspace it waits 4 seconds:

for _,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("Part") or v:IsA("Model") then
v.Parent = game.Lightning
end
end

for _,g in pairs(game.Lightning:GetChildren()) do
if g:IsA("Part") then
v.Parent = game.Workspace
wait(4)
end
end
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
20 Feb 2013 06:46 AM
Put the wait before v.Parent = game.Workspace.
Report Abuse
200AB is not online. 200AB
Joined: 24 Aug 2010
Total Posts: 1604
20 Feb 2013 07:01 AM
Spellcheck, game.Lighting* you put Lightning
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
20 Feb 2013 07:21 AM
Uh oh. WEATHER FORECAST:

Cloudy with a chance of lightning, be careful if you're out today!

:P
Report Abuse
dmjoe is not online. dmjoe
Joined: 01 May 2009
Total Posts: 2387
20 Feb 2013 07:24 AM
I used to think it was Lightning... I never read it quite right.
I could never work out why the output kept saying Lightning was nil :C

~print("pew")~
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
20 Feb 2013 08:08 AM
So this will work?:

for _,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("Part") or v:IsA("Model") then
v.Parent = game.Lightning
end
end

for _,g in pairs(game.Lighting:GetChildren()) do
if g:IsA("Part") then
wait(4)
v.Parent = game.Workspace
end
end
Report Abuse
moryo7 is online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
20 Feb 2013 08:12 AM
@Fedora, it should, but it won't really regen anything. It just moves it from workspace to lighting. If there's a blown up house, and you put it in lighting, it'll go back to workspace still a blown up house.

You probably already knew that, and I'm stupid for saying this.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
20 Feb 2013 08:22 AM
Yeah i knew it was something weird, ok so if the map was in lighting AND workspace (So now the map is also in lighting) would it be like this?:

for _,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("Part") or v:IsA("Model") then
v:Destroy()
end
end

for _,g in pairs(game.Lighting:GetChildren()) do
if g:IsA("Part") then
wait(4)
v:Clone().Parent = game.Workspace
end
end
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
20 Feb 2013 08:39 AM
bump.
Report Abuse
200AB is not online. 200AB
Joined: 24 Aug 2010
Total Posts: 1604
20 Feb 2013 08:45 AM
Whats the problem now?
You didn't state another problem, I'm sure everyone assumed it was fixed.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
20 Feb 2013 08:47 AM
I just wonders if it work its a yes or no to the new script i just posted..
Report Abuse
200AB is not online. 200AB
Joined: 24 Aug 2010
Total Posts: 1604
20 Feb 2013 09:00 AM
Yes, it should.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
20 Feb 2013 09:14 AM
Thanks.

print(floodheck[1])
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