Home > Articles > Scratch resources > 10 block demos > How to greet the player

How the #Scratch username block works

Sean McManus, author of Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps, shows you how to greet the player by username in Scratch

This simple demonstration only works in Scratch 3.0 online, but it enables you to greet the player by username if they're logged in.

when green flag clicked / say / join Hello / Username / Join ends

This simple script works like this:

  • when green flag clicked: starts the script when the player clicks the green flag to run the program
  • say: This block will display whatever's inside it in a speech bubble
  • join: This block enables you to combine two pieces of text together. Using it, you can combine the message 'Hello' and the player's name inside one speech bubble
  • username: This sensing block enables you to see the player's username if they're logged in. You can surprise players by greeting them by name like this, or perhaps display their name next to their score on screen.

Feel free to share that image on your social networks, or to use it with your students or Code Club members!

Find out more...

Find more 10 block Scratch demos here. For more information on my Scratch books and more bonus content, visit the Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps websites.


© Sean McManus. All rights reserved.

Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!

Discover my latest books

100 Top Tips: Microsoft Excel

100 Top Tips: Microsoft Excel

Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.

Scratch Programming in Easy Steps

Scratch Programming IES

This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.

Mission Python book

Mission Python

Code a space adventure game in this Python programming book published by No Starch Press.

Cool Scratch Projects in Easy Steps book

Cool Scratch Projects in Easy Steps

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

Raspberry Pi For Dummies

Raspberry Pi For Dummies

Set up your Raspberry Pi, then learn how to use the Linux command line, Scratch, Python, Sonic Pi, Minecraft and electronics projects with it.



In this entertaining techno-thriller for adults, Sean McManus takes a slice through the music industry: from the boardroom to the stage; from the studio to the record fair.

Scratch Homeschooling resources

Scratch cat with balloons invites you to visit my Scratch resources

Sean's Scratch Resources

Tips, tutorials and free book chapters for Scratch, a coding language widely used in schools.

Walking astronaut from Mission Python book Top | Search | Help | Privacy | Access Keys | Contact me
Home | Blog | Copywriting Services | Books | Free book chapters | Articles | Music | Photos | Games | Shop | About