Custom rig moves weird

Every time i want to make a rig, the limbs move something like this:
Captura de pantalla 2024-07-26 194948

I don’t know how to fix it, i been trying to find a solution, but nothing has worked.

rotate the humanoid root part. make sure the front face is facing the front. (You can turn on the face indicator to find the front face)

Screenshot 2024-07-22 081732