I'm currently writing a datapack and want to have a message send only once to a player when they join the server for the first time.
I have a rough idea of how I could use scores to say who isn't new, but I can't figure out how to target someone when they join.
Here's a quick example of my idea:
/execute unless entity @a[score={joined=1..}] run msg @[<Part I can't figure out>] Welcome
/execute unless entity @a[score={joined=1..}] run scoreboard player add @[<Part I can't figure out>] joined 1
It's just a rough example to show what part I'm talking about, so don't come at me if the syntax is wrong.