This is what I use everywhere. You say this is crashing on you, than run Visual Studio in Debug Mode, the Hard crash should trigger a break point. Use the stack trace to hunt down the problem. Hard crashes are usually caused by the object you are calling the function on being null (“this” probably is null).
After creating the peice you need to Attach it to the actor using
Also don’t forget to register your component. If you are doing this with a Server In mind you run the function on the server only, and make sure replication for your component is turned on.