Squash and cucumbers do well on trellises and it's a big space saver, because otherwise they take up so much space.. Here's a reference:
Trellising for Cucurbits (Cucurbitaceae)Ã¢â‚¬â€Melons, Squash, Gourds, Pumpkins and Cucumbers: Most cucurbits can be trellised (except bush varieties). For any hanging melon, squash, gourd or cucumber larger than a hefty slicing tomato, you may want to tie a sling to the trellis and wrap it around the fruit to hold it secure. Panty hose or old rags work splendidly for this. Teepees, A-Frames, and fences do well for cucurbits; however, most trellis designs will accommodate these opportunistic plants https://www.wasatchgardens.org/Library/TrellisingHandout1.PDF
The plant will develop little vining tendrils to help it hang on. You may need to also tie it a little if it's getting heavy. Also the tendrils wrap better around thin things like twine, it can't grow up fence posts or stuff like that.