I made a little package to flop a cube around, if that’s what you’re doing. You’re welcome to play with it… see attached package.
Also, as exig suggested, if you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: Using code tags properly