Animations glitched

Hello there, I made a character model for the player and made the Idle animation.
I inserted an Animate script and added a script inside of it to delete the original one. When I tested the animation in-game, it came out like this:

The picture below is the original animation (the one that I wanted):

The Picture below is the animation when I test in-game (his foot kinda glitched and also his torso):

stupidanim

The picture below is the explorer of how the character is setup:

explorer

Can anybody tell me why is the foot kinda tilted and the torso is kinda weird? it’s an R15 rig and the same thing happens with the walk!