I'm making a combat system where if i press a Certain key it'll move to a different mode and give it different attacks. A bit like the star glitcher. How do i do this?
✓ ANSWER ACCEPTED
How do i make a combat system where i can switch modes?
1 answer
✓ Accepted answer
what i would do is use 0 and 1, as the "modes" so the concept basically is :
local mode = 0
--lets say the button to switch modes is Q
if Q is pressed and mode == 0 then
mode = 1
end
if Q is pressed and mode == 1 then
mode = 0
end
if ..........keypressed and mode == 0 then
do ....
if ........ keypressed and mode == 1 then
do .....
This discussion is preserved as it was. New answers, comments, and votes are closed.

9 comments
if you want more modes you can use more numbers
If i want to switch it to Q and E do i replace 0 and 1 to Q and E?
do you mean the modes? yes you could do that. but if you want to make more than 2 modes i suggest you use numbers as it is easier.
Alright
Where do i put the script?
depending where you want to put it
Examples?
localscript where you want the inputs to be in
Thanks