Issue with Variable Randomizer

Sorry if this post is confusing, I tried my best to explain what is happening.

So I am following this tutorial video on a gashapon system within RPG Maker. It is very easy to understand and I have recreated this same exact thing multiple times. Those past times I've recreated it, it worked perfectly fine. But now it suddenly isn't working.

The way it is supposed to work is that in Map 1, I interact with an event that transfers the player to Map 2, to which the gacha event will autorun (can't have the event all in one map or else there isn't really a way to make it stop continously rolling).

The first page of the gacha event will run a variable randomizer that chooses between 1 and 5. Each number corresponds to a rarity. If it lands on, for example, 3, it activates a switch that takes you to page 4 of the event, and another variable randomizer will choose between 1-3 to give you 1 and out 3 possible cards.

The SECOND randomize works perfectly fine. But the first one won't. And I don't understand what I did wrong.

It's like each time I load into the playtest, the first variable randomizer will only choose 1 number, and will not choose any other number no matter how many times I roll it. The second randomizer will choose between 1-3 just fine, but the first one isn't actually randomizing between 1-5.

First event. You interact with this to be taken to the gacha rolling event.
Screenshot (937).png

First page of the gacha rolling event. Here it is supposed to randomly choose between 1-5 and then activate the switch pertaining to that number. This is the one not working properly. Each time I load the playtest, it seems to only choose the same 1 number each time it rolls. Sometimes it will be a differeny number, but still only choose that number. Like one playtest it only choose 2, while other playtests it only chooses 5.
Screenshot (935).png

This is the page where it then rolls for one card out of 3 possible ones. This one is working just fine. It will properly randomly choose between the 3 different cards.
Screenshot (936).png

I don't understand why the 2nd randomizer works and the 1st one won't. I really dont know what else to do other than scrap this and restart from the beginning to see if it'll do anything.
Do you do a clean up and set all Switches back to "OFF"?
Otherwise, the switches will remain ON, every time you run the event.

That said, I don't see a reason to split this up into several event pages or even maps.
At those spots you activate a Switch, you could put the followup event code directly. And you might want to nest your Conditional Branches into ELSE cases, so only the active one will run.
Since I can't see all the event on page 2, do you have anything that turns the switch off?

Edit: Ninja'd!
Do you do a clean up and set all Switches back to "OFF"?
Otherwise, the switches will remain ON, every time you run the event.

That said, I don't see a reason to split this up into several event pages or even maps.
Oh my god thank you it was the off switches I was missing. It's working now

The system doesn't work well if it's in the same map. The event will just continue to reroll endlessly. The player switches between the two maps since that is what ends the gacha event and lets you do it again.

Original thread: https://forums.rpgmakerweb.com/threads/issue-with-variable-randomizer.179328/