Tutorial:Tables

Tables are variables used to store Data, bricks or even Parts Let me begin.

To make a Table you have to do something like this:

so I could call my table Table and I could store anything in it I want like Parts Names to print or even lines to a script

Table = {1,2,3,4,5,ScriptinMastar,lol,stuff}

and etc.

so I can show you a example of a script using Tables.

I will use(--) before something to make a comment.

This is a script I made:

game.Players.PlayerAdded:connect(function--function when a player joins the game

Table = {Hello,World,now,bye,cruel,world!}--the table so to print Hello I would write print Table [1] etc.

print Table [1]--prints into the output Hello

wait(1)--Makes the script pause

print Table [2]--prints into the output World

wait(1)

print Table [3]--prints into the output now

wait(1)

print Table [4]--prints into the output bye

wait(1)

print Table [5]--prints into the output cruel

wait(1)

print Table [6]--prints into the output world!

end--ends the script

That is the basics to tables and read up more on the wiki to see how Tables can come in handy for example in data store. Keep exploring scripting and learning!