New to Lua and I can't for the life of me figure out tables.
local Players = game:GetService("Players")
local MasterIngamePlayerTable = require(script.Parent.MasterIngamePlayerTable)
local PlayerState = require(script.Parent.PlayerState)
Players.PlayerAdded:Connect(function(player)
MasterIngamePlayerTable[player.Name] = {}
print(MasterIngamePlayerTable[player.Name])
MasterIngamePlayerTable[player.Name]["state"] = PlayerState
print(game.ServerScriptService.MasterIngamePlayerTable[player.Name]["state"].test)
end)
I get the error [player.Name] is not a valid member of ModuleScript. Thanks for any help!
