Name your animations "Animation1", "Animation2", "Animation3", etc.
Then use :
set animation to : "Animation" & str(playerNumber)
Ahh don't know why I didn't think of that. Thanks Albatr.
set animation to: "Animation" & randomNumber;
You don't need the str() there. So, you can make math to achieve what you need, like:
set animation to: "Animation" & randomNumber*randomNumber/randomNumber+randomNumber;
I tested this way and is working fine.