Code works in Editor, not stand alone

could you please provide more details?
you could use somthing like https://blueprintue.com/ to show more code to us