Display a title to players with a set scoreboard value!

I own a minecraft server and I am making a TnT run minigame all from command blocks for good experience working with CMD blocks.

So I wanted to basically display a title to the players in the minigame. So I decided to do this via a scoreboard. So when they get teleported to the arena, they have a value set to 1 on a scoreboard objective, I then want to display this title to the players with a value of 1.

How is this done?


Solution 1:

Create scoreboard objective:

/scoreboard objectives add inArena dummy

Run on clock to give people in the arena an inArena score of 1:

/scoreboard players set @a inArena 0
/scoreboard players set @a[x=<X>, y=<y>, z=<z>, dx=<X length>, dy=<Y length>, dz=<Z length>] inArena 1

To display the title to people with inArena of 1:

/title @a[score_inArena_min = 1] <Title>