Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i make a combo using UIS?

For ex a player has to click EEQ to do a certain move or animation

1 answer

✓ Accepted answer
local UIS = game:GetService("UserInputService")
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
					--Combo
				end
			end
		end
	end
end)


2 comments

0

Line 6 has an error

0

nvm i fixed it thx

This discussion is preserved as it was. New answers, comments, and votes are closed.