If one thinks about the, "coach told us to," and "racial slurs" narratives, they are pretty much inconsistent. If the ref was uttering the slurs quietly, so as to avoid being heard and later disciplined, how would the coach have heard him so as to tell the players to attack the ref? OTOH, if the slurs were loud enough for the coach to have heard them, there must be scores or hundreds of people who also heard the slurs ... but no one has complained other than the players who (apparently) are the ones making the accusation.
But whatever the case - coach instruction or slurs or both - attacking the ref was simply wrong. If the coach should also be disciplined or have legal charges filed against him, fine, do it. If the ref was uttering slurs, discipline him. The coach's or ref's (or both) wrongs don't justify or mitigate the wrong committed by the players.