Script won't run outside PIE

Hello,

I have a blueprint script that only execute when I run the game in the editor. If I launch or execute a packaged build, the script won’t execute. Note: I am getting an error with this script: I need to compile it each time I load the level before it plays in editor. So I suspect this can be related.