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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Strange problem

Previous Thread :: Next Thread 
LordHyx is not online. 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
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
08 Dec 2012 10:09 PM
try using prints
Report Abuse
ninja5566 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
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