In this question's answer, there are some lines of code I do not understand.
The asker (Bman) has informed me that the code provided by the answerer (Adark) was fully functional with no edits. Here is the entire code;
repeat wait() until game.Players.LocalPlayer.PlayerGui
----------------------------------------------------------
-- Disable roblox's dumb stuff
----------------------------------------------------------
game.StarterGui:SetCoreGuiEnabled("All", false)
----------------------------------------------------------
-- Global Variables
----------------------------------------------------------
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local sprite = script.Parent.Player
local keysDown = {}
----------------------------------------------------------
-- Movement
----------------------------------------------------------
game:GetService("RunService").RenderStepped:connect(function()
local move = 0
if keysDown.a then move = move - 1 end
if keysDown.d then move = move + 1 end
sprite.Position = sprite.Position + UDim2.new(0.01*move,0,0,0)
end)
----------------------------------------------------------
-- Keyboard input
----------------------------------------------------------
Mouse.KeyDown:connect(function(Key)
keysDown[Key] = true
end)
Mouse.KeyUp:connect(function(Key)
keysDown[Key] = false
end)
The lines I do not understand are keysDown[Key] = true and keysDown.a
keysDown[Key] = true
In tables, you can 'set' the value of a specific index by doing something like
local myTable = {}
myTable[1] = "Hello"
However, here there is no index. 'Key' is a string, not a location, so how can he set keysDown[Key]
to true?
keysDown.a
Firstly, what is this? I'm used to dots only meaning children or properties, never tables. If it works the same way, however, it still does not make sense since there will never be anything in the table named 'a'.
Please be detailed in your answers.

3 comments
It seems that when a key is pushed down it adds it to a table. Then when the renderstepped function plays, It checks to table to see if "a" or "d" are being pressed, and if one of them are it moves the sprite. Simple as that :)
I would appreciate an answer on the specific things I asked, and how they work; I've never seen them before.
Table keys are not only restricted to numbers, you can put almost any type of data as a key. The script is taking advantage of that so when they press a key, it sets the value to true where the location is actually a string. Read more here: http://lua-users.org/wiki/TablesTutorial