Chosen Solution

Today,I tried using my front camera and it didnt work. Like, when I switch from tje main camera to this, it freezes. I tried restarting it, I tried clearing data and cache anr I don’t know what else to do.

Did you try a hard reset? You can also try to flash a new rom. If that doenst work we are looking at a hardware problem and you will need to replace the front camera.