#how do I make it so when I use an abilty I cant attack or do other actions

23 messages · Page 1 of 1 (latest)

manic gulchBOT
#

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

toxic arch
#

use the** debounce method**:make a variable called attackmode which will be equal to false, and then make it so that you can only use the ability when the variable attackmode is false with an if statement, once you use the ability, make the attackmode to true, when the attackmode is true, make it so that you cant attack or do any action with if

wide moon
#

do you want the player not to perform any other things like attacking or do you want the player not being able to use the ability?

dull delta
#

I put in an block system but when Im blocking I can still attack and sprint

toxic arch
#

i see

wide moon
#

just deactivate the other things wehn the player blocks

dull delta
#

how do I do that

wide moon
#

How do you trigger the attack

dull delta
#

I press mouse click 1

#

and I double tap w to sprint

wide moon
#

yes but whats the code behind this

dull delta
#

uh

wide moon
#

I would just deactive the script where ur sprinting, attacking

toxic arch
#

i edited

manic gulchBOT
#

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

toxic arch
#

the key is if statements

#

heres a simple example:
local attackmode = false -- with your other variables

if attackmode = false then
-- the code to perform the attack
attackmode = true
wait(3)
end
attackmode = false

toxic arch
#

YES

lethal jackal
#

check if they're blocking before attacking and whatnot

toxic arch
#

thats what its called...

#

my brain

dull delta
#

oh right ok