Execute command on a tick.

I have a question i've been trying to figure this out i want it so a function command runs as soon as a player(ideally only once for the whole server) reaches a certain cords but im so confused.

Continue to help post