how make peg rotation attribute

i use this way make rotation attribute

node.setTextAttr(“Top/Peg”, “ROTATION.Y” ,1 ,30)

changes the value of an attribute of peg’s rotation

This is the wrong forum for your question since there is no scripting for TBS. Also, you should specify which software and version you are asking this question about.