You can absolutely do that—just grab the button’s identifier (right-click it → Copy Element Identifier per the Element Identifiers page) and then use placeholders for its position/size (see the Placeholders page, specifically elementposx and elementwidth).
For example, give your floating text an X position like:
{"placeholder":"calc","values":{"decimal":"true","expression":"{"placeholder":"elementposx","values":{"id":"your_button_id"}} + {"placeholder":"elementwidth","values":{"id":"your_button_id"}} + sin(tickCount*0.1)*10"}}
Replace your_button_id with the ID you copied and tweak the sine math (sin(...) * amplitude) to control the sway. That way the text always sits right next to the button without manual offsets. 😊