Illegal Rifle

Many keep claiming that the rifle Kyle Rittenhouse had was illegal to possess.
Rittenhouse was right to own a rifle, he would not have been able to buy one on his own in the state of Illinois but the rifle was a gift from a family member.