Ok, lets say a PC is being chased by a bare footed undead, whichever type, or guards wearing sandals, and decides to use the Glue spell in a corridor as a trap to slow or stop the pursuit. Would that work or would the creature need to stop, such as to open the door, for that to happen?