Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Countdown Script not working?

Nothing in output.

`countdownNum = 10;

for i = 1,10 do wait(1) game.StarterGui.Msg.TextLabel.Text = (" Starting in : "..countdownNum.. " Seconds...") countdownNum = countdownNum-1 end;`

1 comment

0

Please format you code in lua code block.

1 answer

✓ Accepted answer

Your Problem

Every gui in StarterGui replicates to the client's PlayerGui. So all guis are in players' PlayerGuis. You have to edit them from there! So you'll have to loop through all the players and change their PlayerGuis.


Code

for i = 10,0,-1 do 
	wait(1) ;
	--iterate through players
	for _,v in next, game.Players:GetPlayers() do
		v.PlayerGui.Msg.TextLabel.Text = " Starting in : "..i.. " Seconds...";
	end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.