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

How to check i?

		for i = 20, 1, -1 do
			h.Value = ""
			if i == 10 then
				h.Value = "Game ends in " .. i
			end
            wait(1)
        end
      
		h.Value = "The round has ended"
        wait(1)

Got it how I want, but when i == 10, the value just stasy at Game ends in 10, wheres I want it to say Game ends in 10, 9, 8, etc

1 answer

✓ Accepted answer

Put the if statement inside the for statement.

for i = 20, 1, -1 do
	if i == 10 then
   		h.Value = "Test"
	end
	wait(1)
end

2 comments

0

ok

1

Oh based on your edit, what you could do is change it so the if statement checks "if i <= 10 then" because this will account for 9, 8, etc.

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