gmbox = game.StarterGui.TextGui.Frame.TextBox gm = game.Workspace.GMstat.Intermission while true do while gm.Name == "Intermission" do gmbox.Text = "Intermission" wait() while gm.Name == "Game In Progress" do gmbox.Text = "Game In Progress" wait() end end wait() end
I have this script that's basically supposed to tell the player what's going on in the game, if there is an intermission or if the game is in session, but the problem is that for some reason the Gui only updates when the player dies. Can someone help me fix this issue?
The problem is that you are stuck outside of the loop. You wont hit game in progress because once it changes out of intermission you don't have a way to check for if it says in game because the loop is inside of the first loop still checking for intermission.
I would do this instead, so it constantly checks for intermission, if not intermission then it checks if game in progress:
while wait(1/45) do if gm.Name == "Intermission" then gmbox.Text = "Intermission" elseif gm.Name == "Game In Progress" do gmbox.Text = "Game In Progress" end end