Here are some more details of what i want to achieve
local mytable = {
games = {"roblox","minecraft"},
random = {"radio","umbrella"}
}
print(mytable)
--[[
Output:
games = {"roblox","minecraft"}
random = {"radio","umbrella"}
]]
print(mytable.games)
-- prints: "roblox","minecraft"
-----------------------------------------------
local player = "Bob"
local newtable = {}
table.insert(newtable, {player})
table.insert(newtable[player], "Good boi","happy")
print(newtable)
--[[
prints error
i want it to print:
Bob = {"Good boi","happy"}
also should work with:
]]
print(newtable.Bob)
-- should print: "Good boi","happy"
---------------------------------------------------------
local twotables = {}
table.insert(twotables, table.create(1,"Value"))
print(twotables)
-- this does work but it prints like this: {{"Value"}} instead of what i want: {LVL = {"Value"}}
local bases = {}
game.Players.PlayerAdded:Connect(function(plr)
bases[plr.Name] = <their team> -- Adds their name into the list along with
-- their team name.
end)
game.Players.PlayerRemoving:Connect(function(plr)
bases[plr.Name] -- This will give you which base they have.
end)
I would recommend to use their UserId's instead, as they are truly unique.