READ BOTTOM INFO FIRST
keystrokeHandler.InputToQuery = function(keystrokeTable, state)
Service.uis.InputBegan:Connect(function(input, processed)
if processed or input.UserInputType ~= Enum.UserInputType.Keyboard or not allowedKeys[input.KeyCode] then
return
end
table.insert(state.inputQueue, input.KeyCode)
print(state.inputQueue)
if #state.inputQueue >= state.inputNumber then
keystrokeHandler.FindKeystrokeInput(keystrokeTable, state)
end
if not state.elapsedRunning then
keystrokeHandler.RemoveInputQueueManager(state)
end
end)
end
I'd assume this is enough context, the code itself has no issues until you have more than one call of this function at the same time, like this for example:
keystrokeHandler.InputToQuery(keystrokeTable, keystrokeVars)
keystrokeHandler.InputToQuery(keystrokeTable2, keystrokeVars2)
each keystrokeTable has its own keystrokeVars, but the important thing is in keystrokeVars where there's an empty input query table.
inputQuery = {}
now the thing is that the script has no filter, and since every input is going through the same InputBegan listener, all InputQuery tables will get the same input in them (which is a problem in what my code is doing.), so I was wondering how I could go about coding a filter/safeguard to make sure inputs go only to inputQuery tables they're needed in.
** You are now Level 1! **