You want to make a movement script, instead running a global event you can use a global table which stores the amount of players online, the benefit of this is that you can simply populate the table when a player logins or depopulate it when they log out. This also allows you to easily index the table based on the ip as opposed to their player id.
Another alternative is to use a globalstorage, or you could create a for loop and loop through all the players online, some things are cpu/memory intensive...