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: Changed , clone and destroy

Previous Thread :: Next Thread 
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
03 Apr 2013 06:17 PM
theres no syntax errors and no output


function levelup(lvl)
if lvl.Value == 2 then
script.Parent.Parent.Parent.TH1:destroy()
a = game.Lighting.TH2:clone()
a.Name = TH2
a.Parent = script.Parent.Parent.Parent
end
if lvl.Value == 3 then
script.Parent.Parent.Parent.TH2:destroy()
a = game.Lighting.TH3:clone()
a.Name = TH3
a.Parent = script.Parent.Parent.Parent
end
if lvl.Value == 4 then
script.Parent.Parent.Parent.TH3:destroy()
a = game.Lighting.TH4:clone()
a.Name = TH4
a.Parent = script.Parent.Parent.Parent
end
if lvl.Value == 5 then
script.Parent.Parent.Parent.TH4:destroy()
a = game.Lighting.TH5:clone()
a.Name = TH5
a.Parent = script.Parent.Parent.Parent
end
end

script.Parent.Parent.Level.Changed:connect(levelup)



I think it may be the connection... should it be ...Level.Value:connect?

or its probably something with the cloning and destroying as im quite new to it.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
03 Apr 2013 06:22 PM
function levelup(Val)
if Val == 2 then
script.Parent.Parent.Parent.TH1:destroy()
a = game.Lighting.TH2:clone()
a.Name = TH2
a.Parent = script.Parent.Parent.Parent

elseif Val == 3 then
script.Parent.Parent.Parent.TH2:destroy()
a = game.Lighting.TH3:clone()
a.Name = TH3
a.Parent = script.Parent.Parent.Parent

elseif Val == 4 then
script.Parent.Parent.Parent.TH3:destroy()
a = game.Lighting.TH4:clone()
a.Name = TH4
a.Parent = script.Parent.Parent.Parent

elseif Val == 5 then
script.Parent.Parent.Parent.TH4:destroy()
a = game.Lighting.TH5:clone()
a.Name = TH5
a.Parent = script.Parent.Parent.Parent

end
end

script.Parent.Parent.Level.Changed:connect(levelup)
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
03 Apr 2013 06:34 PM
didnt work also i tried "TH5" instead of TH5 still didnt work.

still no output still nothing happening
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
03 Apr 2013 07:55 PM
bump
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
03 Apr 2013 07:56 PM
oh wait nvmd
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