Alright so I’ve tried grasping this style but I seem to be stuck at making the Combo Number disappear when combo timer is done.
Example:
local mytab={}
local combomoves={
[122]=true;
[122]=function(number)
if number==1 then
print("Hi")
elseif number==2 then
print("Hey")
elseif number==3 then
print("Finished")
end
end;
[122]=true;
[122]=true;
[122]=true;
}
local timer = time()
UIS.InputBegan:Connect(function(input, gpe)
if input.UserInputType == Enum.UserInputType.Keyboard and not gpe then
local keyPressed = input.KeyCode
if combomoves[122] then
if time() - timer < .5 and time() - timer > .2 then
if #mytab < 3 then
timer = time()
table.insert(mytab,input.KeyCode)
local combo = #mytab
combomoves[122](combo)
end
end
end
end
end)
Please help me out here so I can continue and then rewrite it to look more appeasing to me. The Combo System is supposed to work like if you click or use 3 different buttons it forms a combo but only if the combo timer isn’t 0.
if Combo < 3 then
Combo = Combo + 1
wait(combotimer)
script.Timer:Fire() -- < Bindable event
end
script.Timer.Event:connect(function()
wait(.3)
if not busy then
combo = 0
end
end)
There is more questions. You’re trying to use Busy which is not a global variable and should be used inside of client rather than server so that it can stop skill stacking(players using more than one abilities right after they just used one.)