Wrong rotation Procedural Content with Blueprints;base64

I’m following the official unreal course (Procedural Content with Blueprints) but the mesh created does not follow the spline, the rotation is wrong.

This is my construction script :

I’m calculating the distance between two points in the spline


then I divide the vector length of these 2 points by the size of my mesh (Wall_400x400), floor function, and another loop


Finally I get the Location and the Tangent along the spline and add an instance of a static mesh.

The location gives me the vector and I get the rotation from the Tangent vector (RotationFromXVector)


My problem is that the static mesh is not correctly following the Spline, it has like a 90 degrees rotations which I don’t know why.


Thank you