Where you you performing the factory reset?
If you are trying to do it via Settings > Backing & Reset > Factory reset, then try the other method below.
Turn the phone off. Or just hold volume down + power + home until the screen shuts off.
Once it shuts off immediately hold volume up + power + home. Once you see display on screen stop holding power button but hold the rest.
Once you get into the recovery menu stop holding the other buttons. If you see a green android exclamation mark or no command try pressing volume down + power together for a second to attempt to unhide the menu. A few other combinations you may have to try to get it working if it still does not work.
Use volume up and down to navigate menu, power button to confirm selection.
Do a wipe data / factory reset. Wait for it to completely and reboot phone from recovery menu.
This will take some time to boot up again to the welcome setup screen. Give it 5-10 minutes.
Also to make things easier make sure OEM unlock is enabled before you factory reset the phone.
You can enable OEM unlock in developer options. To show developer options you tap on the build number in settings > about phone 7 times.