//Put the spawnpoints in a random order local temp = {} for _,v in pairs( SpawnTable ) do table.insert( temp, math.random( 1, #temp+1 ), v ) end //Check each spawnpoint to see if we're gonna get stuck & use the first 'empty' one we come across for _,Spawnpoint in pairs( temp ) do if !( #ents.FindInSphere( Spawnpoint:GetPos(), 16 ) > 1 ) then return Spawnpoint end end