local stli = game.Workspace.Lights.Stage.Value
local c = 1
while c < 10 do
	print("run")
	wait(.2)
	if stli == true then
		if c == 1 then
			print("okhand")	
			c = 0	
	elseif stli == false then	
		if c == 1 then	
			print("notokhand")	
			c = 0	
		end	
		end	
	end	
end

There's a folder with the boolean in the workspace. All it will print in the console is one "notokhand" and then no more.

Any help is greatly appreciated, thanks ^^

1 comment

0

well, thats because you have both if statements to go off if the value equals 1. However, the moment you have that happen, its set to 0. So, the c value would equal 1, change to 0, then the loop will endlessly run without any output. My suggestion; change the while to For, and make a For loop. its a loop that increments itself overtime. http://wiki.roblox.com/index.php?title=Loops#For