|
| 02 Aug 2012 08:48 PM |
I was going to learn tables.. but I don't see a need to.
1. How often do you use tables?
2. Could you provide an example of what you would need it for? |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2012 08:50 PM |
GetChildren() is a table.
You use it often on game.Players to get a list of all the players.
~This sig is false~ |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2012 08:53 PM |
That just answered something else. Could you give an example on how I'd use GetChildren() to get everything into a table? How would I edit them? Is this like a "for i, v in pairs(game.Players:getChildren()) do"
That brings me to another question. How would you gather all players in game.Players and teleport them to a location? |
|
|
| Report Abuse |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 02 Aug 2012 09:05 PM |
| Tables are useful for many things. I use them in pretty much every script I write. |
|
|
| Report Abuse |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 02 Aug 2012 09:06 PM |
" How would you gather all players in game.Players and teleport them to a location?"
loc = Vector3.new(x,y,z)
for i, v in pairs(game.Players:GetPlayers()) do v.Character:MoveTo(loc) end
|
|
|
| Report Abuse |
|
|
ballen7
|
  |
| Joined: 26 Sep 2008 |
| Total Posts: 819 |
|
|
| 02 Aug 2012 09:15 PM |
http://wiki.roblox.com/index.php/Tables http://wiki.roblox.com/index.php/Ipairs#ipairs_.28t.29
|
|
|
| Report Abuse |
|
|
|
| 02 Aug 2012 09:24 PM |
| Cool, thanks you guys! I will definitely be using this. |
|
|
| Report Abuse |
|
|