It would help to know what game you’re talking about. But in my experience, the only thing that intentionally prevents a game from accepting coins is when the maximum number of credits has been reached. On older games, the machine has a coil in the coin door to prevent the machine from taking more coins.
If that’s not the issue here, then it’s a mechanical problem with your coin mech. It probably needs to be cleaned and adjusted.