Is this how you make a combo punching system?
Asked by
7 years ago Edited 7 years ago
So basically, I want it so that when you press q you punch once with one hand, then the second time you press q it punches with other hand. I've gotten answers on another question, but I cannot add it to this type of script can someone help me? How do I add an If statement to a mouse.Keydown ? Is there any syntax mistakes?
01 | local player = game.Players.LocalPlayer |
02 | repeat wait() until player.Character.Humanoid |
03 | local humanoid = player.Character.Humanoid |
04 | local mouse = player:GetMouse() |
07 | local anim = Instance.new( "Animation" ) |
10 | local anim 1 = Instance.new( "Animation" ) |
13 | mouse.KeyDown:connect( function (key) |
15 | local playAnim = humanoid:LoadAnimation(anim) |
17 | local donefirstpunch = true |
24 | if donefirstpunch = = true then |
25 | mouse.KeyDown:connect( function (key) |
27 | local playAnim 1 = humanoid:LoadAnimation(anim 1 ) |
29 | donefirstpunch = false |