# username — Scratch Block Guide > Returns the signed-in Scratcher’s username, or an empty string if playing signed out. How to use the "username" block in Scratch 3.0 (Sensing Blocks): clear explanation, working block example, and debugging tips. ## What this block does Returns the signed-in Scratcher’s username, or an empty string if playing signed out. Personalize welcome screens or display who holds a high score. - Category: Sensing Blocks - Key tip: Always handle the empty-string case for visitors who are not logged in. ## Working Scratch example Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it. **Example using username** - When green flag clicked - If <(username) = ()> then - Say (Welcome, Guest!) for (2) seconds - Else - Say (join (Welcome, ) (username)) for (2) seconds Try it: Greets signed-in users by username and guests politely. ## Related block guides Explore other blocks in the same category or return to the full English Block Dictionary. - [Back to Sensing Blocks](/en/dictionary/sensing/): See the overview and patterns for Sensing Blocks. - [Scratch Block Dictionary (All Categories)](/en/dictionary/): Browse Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and Extensions. Updated: 2026-11-23 Author: [Takamasa Suzuki](https://scratch.gmnavi.jp/about/author/) Japanese Edition: https://scratch.gmnavi.jp/dictionary/sensing/username/ [Scratch Daizen (English)](https://scratch.gmnavi.jp/en/)