How to create a spline during runtime

Hello, have to tried to call ClearSplinePoints() before adding your points?