How do you change a blueprint spline in-game?

This method worked in a test file but when implemented in another passing the array causes a crash on compile and opening the blueprint.