#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)
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
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?
I put in an block system but when Im blocking I can still attack and sprint
i see
just deactivate the other things wehn the player blocks
how do I do that
How do you trigger the attack
yes but whats the code behind this
uh
I would just deactive the script where ur sprinting, attacking
i edited
** You are now Level 3! **
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
debounce
YES
check if they're blocking before attacking and whatnot
oh right ok