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: Table help.

Previous Thread :: Next Thread 
superior is not online. superior
Joined: 13 Apr 2008
Total Posts: 1662
21 Sep 2012 09:45 PM
So I made a table via script:

open = {}

for i,v in pairs(model:children()) do
open[i] = {v.Name,"open"}
end

for i,v in pairs(open) do
if open[i][2] == "open" then
--blah
end
end

I get an error though.

22:35:29 - 2 is not a valid member of Part

This doesn't happen to me in another script that works fine; why is this happening?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Sep 2012 09:51 PM
for i,v in pairs(model:children()) do
table.insert(open,v.Name"}
end

for i,v in pairs(open) do
i == 2 then
print(i)
end
end
Report Abuse
superior is not online. superior
Joined: 13 Apr 2008
Total Posts: 1662
21 Sep 2012 09:53 PM
I'm not trying to insert the name into the table "open". I'm trying to create a dictionary with parts in a model.

open = {
[1] = v.Name, "open",
}
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Sep 2012 09:55 PM
Do you have actual code within --blah ?
Report Abuse
superior is not online. superior
Joined: 13 Apr 2008
Total Posts: 1662
21 Sep 2012 09:58 PM
Yes, but I fixed it. I accidentally had a "table.insert(open, part)" in my generation chunk... Sorry to waste time. >.>
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