MV Party Limit Gauge - Using Variables

I'm having an issue with this plugin due to an encounter in the game that forces out all party members for a temporary one. The temporary character is then defeated, bringing the party limit gauge to 0. What I'm trying to accomplish is to store the value of the party limit gauge as a variable, and then set the party limit gauge back to what it was before that happened. I was able to store the party limit gauge as a variable, but can't seem to assign that variable back to the party limit gauge. Can someone help?

Thanks in advance!
How did you store it to a variable?
control variables.png

Like this. Storing the value into the variable worked just fine, but I tried doing a script referencing the same thing and making it equal to the variable but I couldn't get it working. I tried this:

$gameParty.partyLimitGauge() = $gameVariables.value(58)

That didn't seem to work. Not sure what else to do at this point..
View attachment 198675
Like this. Storing the value into the variable worked just fine, but I tried doing a script referencing the same thing and making it equal to the variable but I couldn't get it working. I tried this:

$gameParty.partyLimitGauge() = $gameVariables.value(58)

That didn't seem to work. Not sure what else to do at this point..
Try:
JavaScript:
$gameParty.setPartyLimitGauge($gameVariables.value(58));
Wow, that worked! I tried something very similar to that earlier too, but it didn't work at the time. Maybe it was the missing semi colon! Anyways, thank you!

Original thread: https://forums.rpgmakerweb.com/threads/party-limit-gauge-using-variables.139605/