Yes, since you called your thread in onPlayerSpawned, the code was only running from when you spawn until something else changed your vision. onPlayerConnect will start the thread once the player is connected until one of your endon states.