Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make this combat system?

So I'm trying to make a Dragon Ball game, and if you press Q you punch, but how do I make it so the second time you press q you punch with your other hand then, third time you press Q you kick? An example of this system is in this Dragon ball game:

https://gyazo.com/de087de971aced976e63090dd417ac3b

In this GIF i'm pressing Q and it's attacking in an order

1 answer

Make a local bool variable, something like:

-- q punch script with first hand
local donefirstpunch = true
if donefirstpunch == true then
-- q punch script with second hand
donefirstpunch = false

Of course, you can choose what the variable's named - I just named it "donefirstpunch" to clarify.

1 comment

0

I prefer to use a number value so you can add more than 2 moves

This discussion is preserved as it was. New answers, comments, and votes are closed.