For Loop not working

Hello!
I have a for loop for my game similar to piggy.
Here is my script:

	for i = GameTime,0,-1 do
			if i == 230 then
				print('I == 5')
				Values.KillFeed.Value = 'Doge is here!'
				wait(1)
			end
			
			if not table.find(PlayingPlayers,Doge) then
				break
			end
			Status.Value = ToMS(i)
			wait(1)
		end

It works,
but I == 5 never prints, and the toptext doesn’t change to: “Doge is here”

Where I put: if i == 230 then

I get no errors, thanks for any help!

1 Like

I don’t have a solution yet; may I ask what your GameTime variable represents?

2 Likes

GameTime = 240
for i = GameTime,0,-1 do
	if i == 230 then
		print('I == 5')
	end
	wait(1)
end

Did you make sure your GameTime variable is more than 230

local GameTime = 300

I’m trying to make it so that when the clock gets to 230, it prints I == 5. But that doesn’t happen!

Just realised my problem, I’m using a ToMS function which converts to minutes and seconds, so when it gets to 4:30 it’s not 230.
My bad, sorry!