I've looked around on this site and come across this code.

local uis = game:GetService("UserInputService") local inCombat = false local keys = {}

uis.InputBegan:connect(function(key)
    table.insert(keys, {key, tick()})
    if tick() - keys[#keys - 2][2] < 1 then
        if keys[#keys - 2][1].KeyCode == Enum.KeyCode.E then
            if keys[#keys - 1][1].KeyCode == Enum.KeyCode.E then
                if keys[#keys][1].KeyCode == Enum.KeyCode.Q then				
                end
            end
        end
    end
end)

I don't really know how to evaluate and use tables right now. But, is there a better way to code this without the use of tables?

1 comment

0

easiest way i know at the moment