I have a realm that i'm trying to make a welcome message appear only for the player who joined, each time they join. I've looked at some old videos and tried to update the code, but to no success. The best I could come up with is: /execute if score @p[scores={JoinGame=1}] JoinGame Ive already created a scoreboard that uses the score "minecraft.custom:minecraft.leave_game"

I'm pretty new to the new command block system, so a lot of this doesn't make much sense to me. Any help will be greatly appreciated!

  • The linked answer doesn't really explain how to actually do it, only the command syntax, which isn't useful for someone new. What you want to do is create that scoreboard, and then in a repeating command block put execute as @a[scores={leave_game=1}] run title @s title "Welcome Back!". Then, chained to that block put execute as @a[scores={leave_game=1}] run scoreboard players set @s leave_game 0. When a player rejoins, they have a leave_game score of one, so the message is shown and their score is set back to 0. This won't work the first time someone joins. For that use an ID system. – Nik3141 Aug 2 '19 at 17:50
  • This post might be useful for you to learn more about commands. For the ID system, you basically give each player who joins an ID one greater than the player who joined before them. When a player joins for the first time, their score is set to 0, so you detect that and show the message. After that, they have their ID score so you use the system in my above comment to display a message. – Nik3141 Aug 2 '19 at 17:52
  • 1
    Thank you so much! I just got home and tried everything out. I also read a bit into the link you shared, and I'm starting to understand how commands work as a whole. Ive been looking for the answer to my problem for like the past 2 days, thanks again for the help! – Austin B Aug 2 '19 at 19:55
  • 1
    One thing worth mentioning, @Nik: Asker skill level doesn't stop a question from being a duplicate. We're here to help more than the asker, so generally, readers will sometimes need to put in some work of their own to properly understand them. That is okay. – Frank Aug 3 '19 at 0:33