RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"change the seconds for frames"
-- server script local player = game:GetService("Players").LocalPlayer local mouse = player:GetMouse() local humanoid = player.Character.Humanoid local animation1 = game:GetService("ReplicatedStorage").Animation1 local animation2 = game:GetService("ReplicatedStorage").Animation2 local currentAnimation = animation1 local isAnimating = false mouse.Button1Down:Connect(function() if not isAnimating then isAnimating = true humanoid:LoadAnimation(currentAnimation):Play() task.wait(2) -- changed the animation duration to 2 seconds if currentAnimation == animation1 then currentAnimation = animation2 else currentAnimation = animation1 end isAnimating = false end end)