RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"if one animation is playing then the other one can't paly until the first one finished"
-- local script local player = game:GetService("Players").LocalPlayer local character = player.Character local humanoid = character:FindFirstChild("Humanoid") local animation1 = humanoid:LoadAnimation(game.ReplicatedStorage.Animation1) local animation2 = humanoid:LoadAnimation(game.ReplicatedStorage.Animation2) local isPunching = false local function punch() if not isPunching then isPunching = true animation1:Play() animation1.Stopped:Wait() animation2:Play() animation2.Stopped:Wait() isPunching = false end end game:GetService("UserInputService").InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then punch() end end)