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 » Scripters
Home Search
 

table.insert help

Previous Thread :: Next Thread 
banman45 is not online. banman45
Joined: 10 Jun 2011
Total Posts: 24
03 Aug 2015 09:30 AM
Seems like this doesn't work, yet it prints (table: 0AC97420)

modes = {}

modes1 = game.ServerStorage.Gamemodes:GetChildren()

while wait(2) do
table.insert(modes, modes1)
wait(.5)
print(modes[1])
end
Report Abuse
magicalandre13 is not online. magicalandre13
Joined: 21 Jan 2011
Total Posts: 5327
03 Aug 2015 09:32 AM
modes = {}

modes1 = game.ServerStorage.Gamemodes:GetChildren()

while wait(2) do
for i,v in pairs(modes1)do
table.insert(modes, v)
wait(.5)
print(v)
end
end
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
03 Aug 2015 09:33 AM
modes = {}--Blank Table

modes1 = game.ServerStorage.Gamemodes:GetChildren()--makes a table of children

while wait(2) do --wait 2 seconds
table.insert(modes, modes1)--insert new clone of table of children into blank table
wait(.5)--wait half a second
print(modes[1])--print the cloned table name that the children were in
end --repeat until broken
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
03 Aug 2015 09:33 AM
local modes = game.ServerStorage.Gamemodes:GetChildren()

Done
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
03 Aug 2015 09:34 AM
while wait(2) do
table.insert(modes,#modes+1, modes1)
wait(.5)
print(modes[1])
end
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
03 Aug 2015 09:35 AM
I believe what you meant to do is this:


while wait(2) do
local modes={game.ServerStorage.Gamemodes:GetChildren()}
wait(.5)
print(modes[1])
end
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
03 Aug 2015 09:35 AM
What are you trying to do


I don't need a siggy
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
03 Aug 2015 09:36 AM
Oops, typo:

while wait(2) do
local modes=game.ServerStorage.Gamemodes:GetChildren()
wait(.5)
print(modes[1])
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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