the title says it all,im just confused why this isnt working
the "while time1 > 0 then" part is working but the first While is not working and im not sure why
TimeLimit is the script,Time is a IntValue,Enabled is a BoolValue
while script.Parent.TimeLimit.Enabled == true then
time1 = script.Parent.TimeLimit.Time
while time1 > 0 then
wait(1)
time1 = time1 - 1
end
script.Parent.Humanoid.Health = 0
end
the "then" of the first While loop has a red line below it meaning its not going to work and it does not have a collapse and expand that conditions and while loops normally have

3 comments
also for some reason its not showing the code in multiple lines so here is an image of it: https://gyazo.com/203396bdb9919db78e59d3ef917ca189
Is the time1 value a IntValue outside of the script? Because if yes, you just need to put to the end a .Value, like time1.Value < 0
"then" used for if statement: if-then