Set up Name Tags

(Step 6/9) Set up name tags.

1. Go into our room.js file and add an attachTo function in our onJoin function right after our createACharacter function.


g.attachTo('players', client.sessionId,  {
	name:  'nameTag',
	x:  -50,
	y:  -60,
	type:  'text',

You can change where the name tag is created by changing the x and y values.

Download your zip, and upload it to, and you should be able to use the name tags!

Set Up Safe Zones
Set up Scoring

Need Help?

Proofread your code, check with your team and classmates, and if you’re still stuck!

Click Here for Help