How can I remove INPUT(keycode) from my table?

As the title says, here is a fraction of my code:

local UIS =game:GetService("UserInputService")
return function(char)
	local inputs = script.Inputs:Clone()
	inputs.Parent = char
	
	local requiredInput = {} --this would be a module but I've changed it to a table.
	
	UIS.InputBegan:Connect(function(input_, gp)
		if gp then
			return
		elseif not gp then
			table.insert(requiredInput, input_.KeyCode)
			
			for _,v in pairs(requiredInput) do
				print(v)
			end
			
		end
	end);
	
	UIS.InputEnded:Connect(function(input_, gp)
		if gp then
			return
		elseif not gp then
			if table.find(requiredInput, input_.KeyCode) then
				
				--How do I remove it????
				
			end
		end
	end);
	
end

have a G’Day/G’night
Thank ya!

If there is a similar post please inform me :smiley:

Replace this with your if loop, not sure if it fully works this is just out of memory

local index = table.find(requiredInput, input_.KeyCode)
table.remove[index]

Tables n stuff

I feel stupid for such a simple fix, thank you. I don’t work with tables that much so please forgive me, I am going to mark your answer as solution to help anyone that has the same question. I would advise you not to remove it.

They look scary at some times trust me they get fun one you start playing around with em :stuck_out_tongue: