Basically, I’m going to show a video which shows how if I wait till the stun is done, I will be able to punch, but if I make the attempt to attack whilst the character is stunned, it won’t allow to me fight again.
Now, I will show the client side script because it seems to be where the error is orignating considering the fact that the print messages that I put there aren’t actually printing anymore.
UIS.InputBegan:Connect(function(Input, Processed)
Grippy()
if Processed then
return
elseif Input.UserInputType == Enum.UserInputType.MouseButton1 and not UIS:IsKeyDown(Enum.KeyCode.F) then
if HoldingTool == true then
return
elseif HoldingTool == false then
if Debounce == false then
Debounce = true
CurrTime = os.clock()
local PT = CurrTime - PrevTime
if PT < 1 then
Count += 1
if Count > 4 then
print("Resetting Combo.")
Count = 1
end
else
Count = 1
end
print("Ugh?")
RS.CombatEvents.Combat:FireServer(Count)
print("Are we working")
unGrippy()
end
end
end
end)
RS.CombatEvents.Combat.OnClientEvent:Connect(function(bool)
PrevTime = CurrTime
if bool then
wait(CDS[2])
Debounce = false
else
Debounce = false
end
end)
I will also show my method of stun which isn’t really that good. I might change to a childadded and removed event in the possible future.
function RemadeCombat.NormalCombat(Player, Character, DMG, ToolName, Count)
local HitResult, EnemyChar = HitboxModule.Detection(Player.Character, ToolName, Meshes.Hitbox.Size, workspace, 0.4, 0.3)
local Packet = {
qitype = "YinnYang",
attacktype = "Blunt",
damage = DMG,
blockable = true,
countable = true,
}
if HitResult == true then
DamageModule.DamageChecks(Player.Character, EnemyChar, EnemyChar:FindFirstChild("Humanoid"), Packet)
coroutine.wrap(function()
CS:AddTag(EnemyChar, "Stun")
EnemyChar:FindFirstChild("Humanoid").WalkSpeed = 2
EnemyChar:FindFirstChild("Humanoid").JumpPower = 2
end)()
MM.DelayControl(EnemyChar, "Stun", .9*2, EnemyChar:FindFirstChild("Humanoid"), 13, 50.125)
coroutine.wrap(function()
MM.DelayControl(EnemyChar, "GuardBroken", 5, EnemyChar:FindFirstChild("Humanoid"), 13, 50.125)
MM.DelayControl(Character, "Dazed", 3, Character.Humanoid, 13, 50.125)
end)()
coroutine.wrap(function()
for _, plr in pairs(game.Players:GetChildren()) do
VFX:FireClient(plr, "CombatVFX", "vfx", EnemyChar:FindFirstChild("HumanoidRootPart"))
end
end)
local Packet = {
qitype = "YinnYang",
attacktype = "Blunt",
damage = DMG,
blockable = true,
blockbreak = true,
countable = true,
knockback = true,
KBTime = 0.25
}
if Count == 4 then
DamageModule.DamageChecks(Player.Character, EnemyChar, EnemyChar:FindFirstChild("Humanoid"), Packet)
end
end
end