Basically,this is my script
while wait() do if Players.Value >= 2 then StatusBar.Text = "Waiting for round start" for i = 10, 1, -1 do Timer.Text = "Time:"..i wait(1) end elseif Players.Value < 2 then StatusBar.Text = "There needs to be more than 1 player to begin the round." end end
Only the server can see the timer. Players.Value checks how many players there are. The timer and the status bar are textlabels. My script is in ServerScriptStorage
You cannot have any scripts that modify GUIs on the server. They will work in studio because studio’s server and client are connected. However, it will error you had you tested it on an actual Roblox server. Assuming Players.Value = #Plrs:GetPlayers()
then put that whole thing in a localscript and your issue with it stuck being at 9 is because you are consistently looping that for loop over and over since you have it in a continuous (while) loop. To fix that, you must use a debounce
. A debounce is a variable that tells a script a chunk of code has already ran once and that you don’t want it to run again. An example is:
local debounce = false while wait() do if not debounce then -- checks if it already ran once debounce = true -- tells that you already ran this once print(“hi”) end print(“no”) end