Bug with dynamic regions

so help i am trying to make a script that selects all entities in a dynamic region and damages them but when i try to do it it causes an error message and dosent work