function DrawCard()
local Random = math.random(1,7)
-- Create Switch Case
local Factions =
{
[1] = 'Wisdom',
[2] = 'Bounty',
[3] = 'Might',
[4] = 'Culture',
[5] = 'Balance',
[6] = 'Marauders',
[7] = 'Privateer'
}
print(Factions[Random])
script.Parent.Factions[Random].Value = -1
end
Say that Random = 1
print(Factions[Random])
-- Prints Wisdom to output
Then why does
script.Parent.Factions[Random].Value = -1
-- Throw an exception of "1 is not a valid member of script?
I know I can reverse the table to do this, however I am trying to find a much more efficient way and I think there is a much simpler way to do this if I don't reverse it.

4 comments
https://scriptinghelpers.org/questions/60697/why-does-the-table-not-printing-in-logical-order#59068
The word Random is a keyword in roblox. Consider using a different variable name. I am not saying this will fix your problem.
I am just saying that using a keyword as a variable is not encouraged.
@Plegethon5778 This is wrong.
Randomis not a keyword, it is only a global variable. A table, to be specific, that holds functions to create Random objects. It's perfectly fine to name a local variable after an existing variable if you do not intend to use it for the duration of the local variable's scope.