LordHyx
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 5733 |
|
|
| 08 Dec 2012 10:05 PM |
l = script.Parent.Parent.Name .. "1"
function salad ()
h = game.Workspace:getChildren () for e = 1,#h do if h[e].ClassName == "NumberValue" then if h[e].Name == l then b = Instance.new ("NumberValue") b.Name = l b.Parent = game.Workspace else --Lemons
end end end
end
salad()
-----------------------------------------------------------
So, Output won't display anything, and this isn't running. Can an explanation be made? |
|
|
| Report Abuse |
|
|
| |
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 08 Dec 2012 10:12 PM |
l = script.Parent.Parent.Name .. "1"
function salad ()
h = game.Workspace:getChildren () for e = 1,#h do if h[e].ClassName == "NumberValue" and h[e].Name == l then --This, I think b = Instance.new ("NumberValue") b.Name = l b.Parent = game.Workspace else --Lemons
end end end
-----------------------------------
Line 4 I think.
end
salad()
|
|
|
| Report Abuse |
|
|
LordHyx
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 5733 |
|
|
| 08 Dec 2012 10:16 PM |
| Ninja, I've moved the insertion after the else (Where it was originally,) it still doesn't seem to want to work. |
|
|
| Report Abuse |
|
|
mic144
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 1598 |
|
|
| 08 Dec 2012 10:18 PM |
= script.Parent.Parent.Name .. "1"
function salad ()
h = game.Workspace:GetChildren () for e = 1,#h do if h[e].ClassName == "NumberValue" and h[e].Name == l then b = Instance.new ("NumberValue") b.Name = l b.Parent = game.Workspace else --Lemons
end end end
~I ate Telamon's chicken~ |
|
|
| Report Abuse |
|
|
mic144
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 1598 |
|
|
| 08 Dec 2012 10:19 PM |
Capitalization matters. getChildren() --> GetChildren()
~I ate Telamon's chicken~ |
|
|
| Report Abuse |
|
|
LordHyx
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 5733 |
|
|
| 08 Dec 2012 10:28 PM |
| Ah, Thanks. It works. I do appreciate the help. I've only just learned to script. |
|
|
| Report Abuse |
|
|