I'm trying to write a command that will display a title that says "welcome" when you log into my server, but only on the screen of the player that just logged in. I want this to happen every time anyone logs into my server. how can I do this?
If you don't want to take the simple approach of just using a message of the day, this is doable with only 4 command blocks.
Set up a scoreboard objective to track, ironically, when a player leaves:
/scoreboard objectives add left stat.leaveGame
First two command blocks are for a 20Hz fill clock.
Next command block is to actually display the title:
title @a[score_left_min=0] title Welcome!
And the final command block resets the scoreboard objective of all players:
scoreboard players set @a left -1
I'm setting the objective to -1 because I think that will catch everyone, regardless of if they've logged in before, but I can't test that, so it might not work the first time.