washer doesn't agitate but drains ok when I can get it to spin

When I turn on the washer to start the wash, it only hums but doesn’t agitate. But when I advanced it to the spin cycle, it spins but very slowly and sometimes it doesn’t spin at all. I thought it was the motor and bought a new one, installed it but that didn’t solve the problem. The belt looks ok, the pulleys spin, water drains when I turn to the spin cycle. What’s going on, please help. thanx

Based on what you have said it sounds like a transmission problem.