#Combo System Bug

1 messages · Page 1 of 1 (latest)

smoky bobcat
#

For some reason, when I click during the long cooldown after my 3 m1 combo, it queues it and plays it after the cooldown is over. How can i make it not do that? To be a little clearer, the cooldown should nullify all presses of the mouse button when it is active. (Please don't mind the other things happening in this clip like the giant sword attached to my arm, my friend is trying to do something with motor6Ds but he didn't finish working on it.)

#

Here's the localscript that handles the attack system:

balmy tulip
#

Cooldown input detected.
Action blocked until Debounce == false.

smoky bobcat
small jolt
# smoky bobcat ok so where do i put the debounce

replace

if Combo > MaxCombo then
ComboDebounce = true
wait(1)
ComboDebounce = false
Combo = 1
end

with


if Combo > MaxCombo then
ComboDebounce = true
task.delay(1, function()
ComboDebounce = false
end)
return
end

and it'll probably work

median sphinxBOT
#

studio** You are now Level 3! **studio

small jolt
#

sad

small jolt
#

uh...

#

you didn't replace it

#

you just put it below it by a few lines lol

smoky bobcat
#

wait im sumb

#

😭

#

that permanently broke it 😭

small jolt
#

Wait nevermind you did replace it, you just moved the original above it lol

smoky bobcat
#

for some reason i had it twice

#

also now the combo doesnt reset

small jolt
#

uh

smoky bobcat
#

should i just reset the Combo* variable in the functon?

small jolt
#

?

#

send the scripts current state rq

smoky bobcat
#

cause now after it goes once it stops working

small jolt
#

Oh shoot

#

this one's my bad

#

I forgot to have it reset the combo in the one I gave you

#

Yeah just make sure to put the Combo = 1 in that function

smoky bobcat
#

sick

#

ok so when i reset everything stops working

smoky bobcat
smoky bobcat
small jolt
smoky bobcat
#

yea

small jolt
#

That'll be the issue

smoky bobcat
#

what

#

oh is it supposed to go in like replicated storage or smth

small jolt
#

Those don't reset when the character does, so therefore when your character dies, the character variable is now set to something that doesn't exist as well as every variable connected to it

smoky bobcat
#

oh 😭

#

so how do i go about fixing that

small jolt
#

Now, while you could make a player.CharacterAdded thing that resets the variables, you could also just put it in startercharacter scripts

smoky bobcat
#

oh ok that works

#

now the sword is gone but the punches work but i think thats smth my friend is supposed to do

#

thanks for the help

small jolt
#

The sword loading is a pretty easy fix as well

smoky bobcat
#

oh whats the fix for that cause hes losing it in vc lol

#

cause hes trying to use like motor6ds and stuff but neither of us know how it works so we're trying to figure it out

small jolt
#

Instead of CharacterAppearanceLoaded, try CharacterAdded

smoky bobcat
small jolt
#

Well, I'm assuming your friend is the guy having problems with this

smoky bobcat
# smoky bobcat hold on is this supposed to be serverside or local

heres the script btw local Players = game:GetService("Players")
local RepStorage = game:GetService("ReplicatedStorage")
local Weapon = RepStorage.Assets:WaitForChild("Weapon")

Players.PlayerAdded:Connect(function(Players)

    Players.CharacterAdded:Connect(function(Character)
        
        local RightArm = Character:FindFirstChild("Right Arm")
        
        local ClonedWeapon = Weapon:Clone()
        ClonedWeapon.Parent = Character
        
        local Handle = ClonedWeapon:FindFirstChild("Handle")
        local CFrameValue = ClonedWeapon:FindFirstChild("Value")
        
        local motor6d = game.ReplicatedStorage.Assets.Weapon.Handle:WaitForChild("Motor6D")--Instance.new("Motor6D")
        motor6d.Part0 = RightArm
        motor6d.Part1 = Handle
        motor6d.C1 = CFrameValue.Value
        motor6d.Parent = Handle
        
    end)

end)

small jolt
#

So just edit this

smoky bobcat
#

thats him

#

the thing is i changed that and when i reset it still disappears

small jolt
#

Try WaitForChild for the right arm

smoky bobcat
#

it is still disappearing

#

disappearing when i reset

small jolt
#

Hm

#

This script is in serverscriptservice right

smoky bobcat
#

yea

#

the sword in question is stored in replicated storage under a folder called "assets"

small jolt
#

are any errors showing up in the output?

smoky bobcat
#

no

#

wait

#

i lieed

small jolt
#

Oh, well i think i found the problem

smoky bobcat
#

infinite yield?

small jolt
#

Yeah

#

and I know why

smoky bobcat
#

cause im getting an infinite yield on the motor part and its not there

small jolt
#

You're grabbing the motor6d from the model in the replicated storage instead of the clone 😭

smoky bobcat
#

oh wait that makes sense

#

i wasnt the one who wrote this and i did stupid edits 😭

small jolt
#

My previous changes I told you to make can be reversed if you want btw, they aren't really doing anything

smoky bobcat
#

oh ok

small jolt
#

They were just kinda hail marys because I didn't see the motor6d problem lol

smoky bobcat
#

😭

#

iirc there was also some issue with getting the position of the handle to be in the right spot

median sphinxBOT
#

studio** You are now Level 4! **studio

smoky bobcat
#

so then what does the handle get welded to

small jolt
#

If you're using the motor6d directly from the animation, then the C1 is already set where it needed to be by default

smoky bobcat
#

oh

#

thank you i will make him animate to see if it works

small jolt
#

Uh, that last sentence might change things

smoky bobcat
#

what

#

i thought it was from the animation

#

so i delted the c1 from the script

small jolt
#

I thought the animation was already done and you were using a motor6d with preconfigured settings

#

He's using moon animator do animate the weapon, right

smoky bobcat
#

he's using blender

small jolt
#

Imma be honest, I've never used blender for animations

smoky bobcat
#

hes using moon to weld it

small jolt
#

So I don't know how that works

#

Oh, if he's using moon to weld it then maybe I do know

smoky bobcat
#

oh ok so how do i do it with moon

small jolt
#

Well, tell him to make the animation and see if it works, because the thing I was assuming was that he was animating a motor6d welded with moon animator lol

median sphinxBOT
#

studio** You are now Level 10! **studio

smoky bobcat
small jolt
#

I have no idea, but hopefully

smoky bobcat
#

so would that fall under the moon weld fix

#

ok so im gonna force him to animate it

#

and we'll test ig

small jolt
#

Gl

smoky bobcat
#

thanks

small jolt
#

I mean, I think it should work fine as long as he used moon animators welder right

smoky bobcat
#

is there like a tutorial for it

#

cause he would greatly benefit from it

cosmic sage
#

combo system super easy, barely an inconvenience. i dont understand why you having such trouble with it. all you have to do is put code and m1 go brrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr

smoky bobcat