What's a good way to do screenwrapping?

In my last project, enemies could screen wrap, as in they would leave through one edge of the screen and come back on the opposite end, like the game asteroids.

However, I did it like this, which would cause the game to lag if there were too many Actors.

If anyone knows a better, less laggy way to do this, it would be much appreciated! Or maybe my computer is just really weak. (Also I KNOW this is what causes the lag, as when I deactivate these events there’s no lag)

I think you don’t need variable and repeat for each and that would be cause of your lag

Also there is literally extension called screen wrap or something like that