I have a script that waits until a certain value is changed, senses the change, then counts down. When the count down is done, it opens a lobby that players can join and leave as they please. However, the script seems to be unresponsive, and the count down never happens. I don't know exactly the problem, but I'm assuming its the "changed" command, as that's where the script seems to stop. Also, it doesn't give me any problems in output, it just seems to stop working at that part for whatever reason. Here's the script:
a = game.Workspace.Values.CurrentRace game.StarterGui:WaitForChild("HUD") print("got it") a.Changed:connect(function() if a.Value == "none" then game.Players.LocalPlayer.PlayerGui.HUD.CurrentRace.Text = "Next Race Starts in:" local time = 5 for i = 1, 5 do wait(1) time = time - 1 game.Players.LocalPlayer.PlayerGui.HUD.Countdown.Text = tostring(time) end print("done") game.Workspace.Values.CurrentRace.Value = "lobby" end end)
There is a separate script that changes the "CurrentRace" value, and yes, that script works fine. Its just this script that breaks. One more thing: 90% of my questions on this website relate to problems like this, as I always have problems with these types of scripts. So if you could give me any advice on how to troubleshoot and attempt to manually fix problems related to these types of scripts, that would be awesome!
All help is greatly appreciated!