GetCapsuleComponent() is nullptr when I launch game in Target: Game, in Target: Editor everything is fine. I tried reloading blueprints and repareting them, didn’t work. How to fix this stupid bug?
Not sure in your case, but unreal creates first actor, then its components.
So it may be that when you try to get pointer component is not yet created.
bWithPushModel parameter in Target.cs file caused this and many other problems in my project if not launched with editor, so I guess PushModel is not working correctly yet.