The action Set animation frame int(random(object.AnimationFrameCount)) should work.
You need to make your randomised number an integer though (int()) because random() will return a float and frame numbers in your sprite are integers.
If you still have an issue, consider posting your project to make it simpler to investigate.