so I’m testing methods on making a combo system so far I’ve got nothing since I don’t know how (I know, pretty pathetic). Now I ask you guys to please help me make a combo system.
Right know, all I got is:
local UIS = game:GetService(“UserInputService”) local count = 0 UIS.InputBegan:Connect(function(input,gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.E then count = count + 1 print(count) end end)
now what I’m trying to do is whenever you don’t press it for (X) seconds the count must reset to 0. How would I do this? Thanks!
Simply add a wait() after adding the count.
local UIS = game:GetService(“UserInputService”) local count = 0 UIS.InputBegan:Connect(function(input,gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.E then count = count + 1 if count == x then -- Code here count = 0 end print(count) wait(x) count = 0 end end)
Marked as Duplicate by Leamir
This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.
Why was this question closed?