If your variable words is (for example) a sentence made up of 5 words, then this definition means that word = 5 - 1 = 4. In your code at the moment, you’re then trying to summon ‘4’. Is that what you want?
To answer your question, once you define word right then you want hero.summon(word) not hero.summon(“word”), as you want to use the variable you’ve defined.
Great! And yes you’re exactly right that you don’t know the number of words in the message. So instead of ‘4’ put in ‘words.length-1’, and then the code will work every time.