New motor not working

My dryer would only work when holding the push to start button down so I figured my new motor was bad. I got a new motor (part 279827) and can’t get it to run. The plug is the exact same and the old motor will still run with button pushed down. The new motor did have a flash of blue near the plug once and start for a few seconds. Any ideas?