Updating local boolean for multiple while loops

Currently, I have a script with a couple of coroutines with while loops that are supposed to be only active when GAME_ACTIVE = true.

local GAME_ACTIVE = true

	while GAME_ACTIVE = true do
                 -- do stuff here

	while GAME_ACTIVE == true do
                if condtion > 0 then 
                        local GAME_ACTIVE == false 

Here’s a shorter version of my code without all the filler.
When the condition is met then it will print out GAME_ACTIVE = false in the second coroutine. However none of the loops ever end.
I used a timer to go off after the “if condition > 0 then” is met in the other coroutine and it still showed as local GAME_ACTIVE = true.

How can I get the variable to update across the whole script?

Remove the “local” and only use 1 = sign when assigning the value of a variable

That was a typo I made in the post sorry. In my actual script I don’t have two = signs. Also I tried with and without local and it doesn’t work. I ended up using breaks and that seemed to work.