How do you make a combo?

So I need some information on how to make a combo system. What could be the best way in order to make one?

And here’s my punch script (a local script located in StarterCharacterScripts):

local Player = game.Players.LocalPlayer
repeat wait() until Player.Character
local Humanoid = Player.Character.Humanoid
local UIS = game:GetService("UserInputService")
local debounce = false
local Punch = script.Punch
local Punch2 = script.Punch2
local LeftArm = game.Players.LocalPlayer.Character["Left Arm"]
local Table = {LeftArm}
local CanDamage = false

UIS.InputBegan:Connect(function(Input, IsTyping)
	if IsTyping then return end
	if not debounce then
		debounce = true
		if Input.KeyCode == Enum.KeyCode.Z then
			local PunchTrack = Humanoid:LoadAnimation(Punch)
			CanDamage = true
			PunchTrack:Play()
		end
		wait(1)
		debounce = false
	end
end)

--RemoteEvent--
local RmtEvent = game.ReplicatedStorage.RemoteEvents.Punch 

for i,v in pairs(Table)do
	v.Touched:Connect(function(hit)
		if hit.Parent:FindFirstChild("Humanoid")and CanDamage == true then
			CanDamage = false
			RmtEvent:FireServer(hit.Parent)
			print("Enemy Hit!")
        end
	end)
end
1 Like

what do you mean ‘combo system’? that is very vague…
street fighter combo system? black magic 2 combo system? like what do you define as a ‘combo system’? hitting people and adding a hit counter; or hitting people and being able to transfer into other moves… perhaps pressing multiple keys to execute something?
please elaborate to me so i can help

1 Like

I hate necroposting but I might have an idea, I’m probably gonna get flagged but I might be able to help, if the combo system you mean is something like:
Presses Z, punches with right hand, presses fast another time Z, punches with left hand, presses fast another time Z, special attack, i would do something like:

-attack script
—this is the combo part
while wait(1) —or the time you want before the combo will not be triggered do
UIS.InputBegan:Connect(function(key, processed)
if processed then return end
if key.KeyCode == Enum.KeyCode.Z then
—play left punch animation

Thsi is how I would crate thsi system, hope this helps!