I’ve made a sword swing animation, but I want to make it so when I click once it does a right one and if I click it a second time it does another swing animation. Is it possible? and if it is then, how do you make it?
Thx
I’ve made a sword swing animation, but I want to make it so when I click once it does a right one and if I click it a second time it does another swing animation. Is it possible? and if it is then, how do you make it?
Thx
Simple if
statements and increments will solve this. For example:
local swingCount = 0;
function swing()
if swingCount == 1 then
-- play animation 1
else
-- play animation 2
end
end
Make sure to decrement the value every few seconds or so (attack cooldown) so you don’t end up with a spam-high number and can’t play any animations.
EDIT: Also, use debounces to prevent spam clicking the sword.