How to spawn players on different spawn points

Hi all,

I’m trying to fix a “bug” of my game (GlassOfDuty), but I cannot figure out what causes it.

My game has a maximum number of players set to 4, and 4 different spawn points. Each spawn spot has two “start” entities (one flagged as IsLobby, and the other unflagged). The problem is that both at lobby start and at round start it often happens that 2 players spawn at the same spot. I would like to avoid that, and giving a look at the spawnUserScript, I found a function (findSpawn()) which (as far as I understood) assigns a score to each spawnPoint, basing on the fact that there are near players, in order to choose the most appropriate one. But it doesn’t seem to work, since most of the times there are some empty spawns and 2 players spawning at the same spot. Do you know what is the cause of this bug? Is there a known way to fix it?

Thanks in advance,