MV [Solved] Add a State to all Actors in party (Both Active AND Inactive) using a script call?

Kind of a follow up to my last post here but is it possible to use a script call or something to add a state to ALL party members (Both the ones actively battling AND the ones currently in reserve) during a battle? If there's a plugin for this or something then that'd work too!

I only ask since it's pretty tedious to have to go into a common event and set each actor to be given the same state and I wanna avoid that if possible and have to process be quicker. If not I can just do what I have been and suck it up
try
Code:
$gameParty.allMembers().forEach(m => m.addState(x))
replace x with the id for the state
try
Code:
$gameParty.allMembers().forEach(m => m.addState(x))
replace x with the id for the state
Thank you! Works perfectly!
This thread is closed due to being reported as solved. If you need it reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/solved-add-a-state-to-all-actors-in-party-both-active-and-inactive-using-a-script-call.178432/