Are you using mirrored animations?
Also, you really should give your character animations unique names. If you had multiple characters active on the same scene & all of their general animation names (walk, talk, idle, etc) are all named the same "front", "back", etc, then the engine will have no idea which animation you are trying to access in the ActiveAnimation table. You should name them something along the lines of this... "tom_idle_front" or "tom_idle_s" - s being short for south. This way, you won't generate any conflict issues because the engine doesn't target self when you access an animation via the animation, but instead it access a global table that contains all of the active animations that are currently playing on the scene.
Quick tip #1: you might want to include math.randomseed(os.time()) above the first line of your script to guarantee a random number each time math.random() is used - or alternatively, add the math.randomseed line into an execute a script action part in the game launch actions via the main game settings section of the editor.
Quick tip #2: there's an alternative method you could use to add dynamic blinking to your characters seeing as you are using a single frame idle animation - I personally had to use AnimationLastFrame because our characters have animated breathing. The method is to create an execute a script action part for the first frame & then you will use math.random() to determine how long the first frame should be displayed for, then in the next frame you will set the global delay time back to the default value. That way you can set a min/max delay for how often the character should blink.