Collision boxes are based around the origin point of the model but if the animation moves the entity the box won't move with it, this is likely the issue you're seeing.
As for your original all issue, as belidos said, its because you have 1 overall variable controlling all the entities with that script, it will only work for one object as as soon as that first one is run the variable is changed and the rest will not meet the requirements anymore.
You need to change the requirement to an array.
if runanim[e] == 0 then
SetAnimation(0)
LoopAnimation(e)
runanim[e] = 1
end