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