Play animation when object is clicked

im making a game almost like slender where the player is collected objects to find his past…
what script would make a “cube” move when clicked

So when you want a cube to be moved? What do you mean?

So make a Script and have a function OnMouseDown() and then do what ever you want to do.

From your question details, you don’t explain how you want your cube to move. (You said below you had an animation.)