How to play animation when player clicks an actor?

You would have to do something like this then.