Until dispelled or triggered
You use the cord or rope to create a 5' radius circle on a flat surface within your reach. When finished casting, the cord/rope disappears to become a magical trap that is nearly invisible and requires a successful INT (Investigation) check against your spell save DC to be found. The trap triggers when a Small or larger creature moves into the spell area. The triggering creature must succeed on a DEX saving throw or fall prone and be hoisted into the air until it hangs upside down 3 feet above the protected surface, where it is restrained. The restrained creature can make a DEX saving throw with disadvantage at the end of each of its turns and ends the restrained effect on a success. Alternatively, another creature that can reach the restrained creature can use an action to make an INT (Arcana) check against your spell save DC. On a success, the restrained effect ends.
30 feet of cord or rope, consumed by the spell