User:ENET/StepByStep/Game Indexing
Game Indexing
+ game
- Workspace
- Players
- Lighting
- Teams
To the left is the basic game layout of the default roblox place. Any time you first create a new game, that is what this looks like. It is fairly simple to understand. The top of the list is game, all the items beneath it are sub-directories of game. Think of it like this, game is a folder, and all the other items are folders within game. To get to them you first have to 'open'(index) game.
Indexing a Player
+ game
- Workspace
- Players
-- BlueTaslem
-- Player
-- LocalChum
-- ENET
- Lighting
- Teams
Let's say that is our current game layout. Well, our goal is to index the player named 'ENET', who just so happens to be colored blue so you can see. As you may tell, he is located in the folder named 'Players' which just so happens to be located in 'game'. So how do we index the player?
game.Players.ENET
Woah, what is that? That, my friend, is how you index players. Notice we used a '.' to index a child/subfolder with in the parent/current folder. Saying 'game' indexs 'game', if we say 'game.Players' we index game, then the . says that we are gonnah index a child of the current index, so putting '.Players' after 'game' says to get the index named Players in game.
Saying 'game.Players.ENET' says get game, then get Players in game, then get ENET in Players. Note that when indexing, names are case-sensitive. 'Players' is not the same as 'PlayERS', and 'ENET' is not the same as 'enet'.