Mothers with toddlers.

I dont know what to do. My child turned 3 in November. I got him a potty and he use to want to sit on it and it was hard to even get him off of it. Now he wants nothing to do with it. He takes his diaper off all the time and when i try to get him to use the potty he refuses to sit on it. He will cry for his diaper to be on. Ive tried underwear he takes it off right away. He will pee on the carpet and then freak out and say no pee... and hit himself down there.. i dont know why he does that. I have never gotten mad at him for peeing on the carpet .. I thought he was ready when we got the potty and now all of a sudden he isnt.. 😦 idk what to do..