#Help with cooldown issue
149 messages · Page 1 of 1 (latest)
script please
lemme know if you still here
i will change it
but i want to know what is the problem that cause the bug
@frigid bison
yes :3
i sent the code buddy
ik
you will help me?
issues
many
hit() and hit2() functions increment the global variable punchA
it will increment beyond the range
ur reset punchA wrong
oh
bruh the `
things
remained
sad
discord asks me to send as file
but then it dont delete
the shit
so sad
I just
fixed ur punch
WHY IT DELETE MY MESSAGE IT STOPID BOT I CANT TALK IN ONE PHRASE
:((( so shit bot it bully me:((
lol
all day it deleted my messages
you gonna change the bot script
tell me if the refactored function works
oh
what you did here?
so it just make the 2 animations run togther
oh
maybe
the thread
did some fun
racing
wait a bit
i forgor something
wait
my vsc crashed...
stupid....
Send it as a .lua file
ok
ok
it doesnt override each other but at the second the first animation stopped play the second animaton went right away, and i wanted the second animation to play if the character clicked again
mhmm
OF COURSE IT ADDED MY CAN U TRY THIS TEXT
nah im quitting discord
its ok
so?
works
half works?
0 works?
or still 2 play
instant after 1
now if im spamming clicks it will play the second animation but if i wait 1 sec it will play the first animation, the punch at acting bad
the ok was ment for the added text at the start
yes
ping me if i dont answer fast
@rocky ledge
xD
errror ServerScriptService.PunchServer:104: attempt to index nil with Instance
huh?
i think you forgot to announce local lastPunchTime
i jsut sent the punch function
forgor
local lastPunchTime = {}
add this
up
in ur variable
s
ok
and change to this
if lastPunchTime[player] and tick() - lastPunchTime[player] < punchDebounceDuration2 then
so no error appear
in case any appears
the first click playing the first punch, but even if i dont hit character the second animation play and just stuck on the second animation
everytime i click
that's why I hate animations:((
maybe i will return to my original?
** You are now Level 6! **
stuck?
like it only plays 2
or
yes
idk maybe, every change a new issue appear xD
the original problem was when i click one more time after the second animation, and before the cooldown of the second punch wear off there will be bug that no longer let you use the punch mechanic/skill
use ur original
code
but add this at punch function
beggining
i do
if punchDebounce[player] then
return
end
still the bug is there
And if you're a gigachad you can even
local punchDebounce: {[Player]: boolean} = {}
...
Cause typing is cool
what is this?
It's typed variables
Here you say your punchDebounce will be a dictionary of key Player and value a boolean
So you can do like
punchDebounce[playerService.paulogarithm] = true
But not
punchDebounce[3] = true
Or I can't
punchDebounce[playerService.paulogarithm] = 3
ok
em?