Ive tried something like this aint I don't think it works. There is no output.
local keys = { "A"; "D"; } uis.InputBegan:connect(function(key, process) if key.KeyCode == keys[key] then -- end end)
You were close. Do something like this:
local keys = { Enum.KeyCode.A; Enum.KeyCode.D; } uis.InputBegan:connect(function(key, process) if table.find(keys, input.KeyCode) then -- end end)
You can try a for loop and check if any values match the key.
local keys = {"A", "D"} uis.InputBegan:Connect(function(key,process) for i,v in pairs (keys) do if v == key.KeyCode then ----- break end end)