NEW Explore the Scratch Block Dictionary, tutorials, textbook, and classroom guides

Start learning →

How to Add a Mute / Unmute Audio Button in Scratch

📌 What you will learn

Toggle volume between 0% and 100% when clicked.

Minimal Working Block Recipe

Toggle volume between 0% and 100% when clicked.

Test this minimal version first, then tune numbers like speed, gravity, or timing to match your game feel.

Add a Mute / Unmute Audio Button script
  1. when this sprite clicked -> if (volume) 0> then set volume to 0% else set volume to 100%

Try it: Essential for classrooms and quiet spaces.

Debugging Checklist & Next Steps

If it behaves unexpectedly, verify initial variable resets on the green flag and check that continuous checks sit inside a forever loop.

Related Deep-Dive Guide Explore full mechanics and variations. Learn more → All 120 Scratch How-To Recipes Return to the reverse lookup index. Learn more →

This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.