The Mulford Act was pretty explicitly to stop the Black Panthers from carrying guns. And they entered the chamber "to show their opposition". But (at least in hindsight), it seems like this stunt guaranteed that the legislators would get scared of "a band of armed Negroes" and pass the bill BECAUSE of this event.
Did they really think their action would make the legislatures vote it down? Or did they want it to pass for some reason? Or maybe they saw it as inevitable, with or without their demonstration?
Here is a relevant discussion which may interest you while you wait for a response to your specific question: How did pro-gun/2nd amendment activists view the Black Panther's party use of guns/open carrying? with a response by u/EscapeAndEvadeSteve