Actually, the way linguists work is they try to read the language and connect it to modern local dialects to get more insights. For example the Rosetta Stone had written on it in three scripts the name of the king Prolemy with a circle around it (in Ancient Egyptian hieroglyphics, In Ancient Egyptian Demotic and in Ancient Greek) and from this word in Ancient Greek they started getting insights in hieroglyphics and unveiling the meanings of them in ancient Egyptian. An other example is the deciphering of Linear B glyphs which was Ancient Greek. They assumed that a symbol like a sword was writting "ξίφος"="ksifos"="sword" in Ancient Greek, and from this substituting it in other occurances and combining it with modern spoken words of locals they have managed to read and unveil the whole meaning of the script.
Fun fact: A script can contain syllabograms or signle letters that expose a specific sound. The first thing a linguist will do is count the different "images" and if they are less than 28-30 then they are letters but if they are 64-90 they are syllabograms (that is two letters combined to produce a syllable - modern Korean is like this and also Japanese). At last if they are much more than 90 then they are ideograms like Chinese. Summing this all up even if you do not know what the script writes just by counting the different "occurances" you can get an initial insight of how the written script approaches the language. This was the initial step in reading the Mayas script.
Of course there will be some errors in approaching the pronunciation but in this case you can see a video in Ancient YouTube...