RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make that it gives only 4 punches in this order: anim1, anim2, anim1, anim2"
-- local script local player = game.Players.LocalPlayer local character = player.Character local humanoid = character:WaitForChild("Humanoid") local animation1 = humanoid:LoadAnimation(script.Parent.Anim1) local animation2 = humanoid:LoadAnimation(script.Parent.Anim2) local punches = 0 local function punch() punches = punches + 1 if punches % 2 == 1 then animation1:Play() else animation2:Play() end if punches == 4 then punches = 0 end end script.Parent.MouseButton1Click:Connect(punch)