#Why is this happening?

1 messages · Page 1 of 1 (latest)

fleet cobalt
#

I have this script here that is suposed to do a cooldown between my punches, It works good. But if my character gets reloaded while im on cooldown i'll not be able to punch and i dont know why.

#

i tryed printing it and aparently if i am on cooldown while my character is loaded for some reason the code doesnt remove the player of the cooldown table

#

why does this happen?

orchid dove
#

Where is the local script parented to

fleet cobalt
#

Its on started character scripts but this shouldn't matter should it? i can print the cooldown table so it is the same even when i reload the character so why doesnt the task.delay work?

#

i sent the message and realized

#

its just bc the cooldown is out of the function im dumb sorry

#

now i just need a solution for this

atomic mason
#

put your script in starterplayerscripts

#

or module

#

wait

fleet cobalt
orchid dove
#

So if the local script gets deleted when the character respawns, it deletes the task.delay as well