How Do I Generate a Random Animation Without Repeats?

Thank You, I really appreciate it.

The issue is that you have the AnimationArray already filled with 52 children, all with a value of 0. That repeat loop then appends 52 cards in addition to the 52 0 values, and when it gets shuffled there are a number of repeats of 0 value.

To fix this, just declare the Animation array with no children:

Now something weird is happening. Cards are generating more randomly this time. However, each time the scene resets (when I press play again) more and more of the ace of clubs (the first animation) comes up and repeats. Every other card works fine, but the ace isn’t getting deleted and keeps showing up every time.

Since it’s a global variable, AnimationArray retains the previous game run’s cards. Fix it by clearing out the AnimationArray before you fill it (so an event just before the the repeat 52 times event).

It works! Thank you so so much. One more thing, there is a sound effect for when the player busts, however it glitches in my game and sometimes doesn’t play. Does the sound work on your end? What is the problem?