How do I delete an array's value

So I scripted the shuffleModes array to assign a random value onto a text label (I’m making a mode voting system, but after I assign a value with the RandomMode variable from the shuffleModes array, I want to remove the RandomMode value from the shuffleMode table but…

Using RandomMode = nil or table.remove(shuffleModes, RandomMode) or even shuffleModes[RandomMode] = nil doesn’t work because RandomMode is a value, not a key.

So how do I delete the RandomMode value and its key from the shuffleModes table after the RandomMode value is assigned to a textLabel in studio?

-- shuffleModes table when completely filled
{
   [1] = "FFA",
   [2] = "Nothing happening",
   [3] = "Teamed"
}

Script in question

for i, choice in pairs(workspace.VotingPlace.Modes:GetChildren()) do
		local name = choice.SurfaceGui.ModeName
		local voteCounter = choice.SurfaceGui.Votes		

		local shuffleModes = {}
		for gamemode, _ in pairs(round) do
			table.insert(shuffleModes, gamemode)
		end

		local RandomMode = shuffleModes[math.random(#shuffleModes)]
		name.Text = RandomMode

        -- After this I want to delete 'RandomMode' from the 'shuffleModes' table
 	end	

It is a simple question, yes but I couldn’t find a solution to fix this problem

save the variable of the math random

rand = math.random(#shuffleModes)
local RandomMode = shuffleModes[rand]
name.Text = RandomMode

Then whenever you want to remove it from the table you will re-reference that same number value in your key

-- This is just an example line you could do
shuffleModes[rand] = nil

Although not a big problem by any means, you could just use a regular table for this, as the indexes of each item is the key in the dictionary. I completely get if you are using it for readability though.

Also, I didn’t code this in Roblox studio so I might’ve made a syntax mistake. Should be an easy fix though since I’m mostly focusing on the idea.

Good luck!