Hello, I am making a timer script that counts in Hours, Minutes, and Seconds, but at line 13 it always says "Expected 'end' (to close 'else' at line 12'), got else. No matter how many "end"s I put, the problem is never fixed. Here is the LocalScript:
function Count() wait(1) Seconds = Seconds - 1 if Seconds == 0 then Minutes = Minutes - 1 if Minutes == 0 then Hours = Hours - 1 end end if Hours > 9 then if Minutes > 9 then if Seconds > 9 then script.Parent.Parent.Timer.Text = Hours..":"..Minutes..":"..Seconds else else else if Minutes > 9 then if Seconds > 9 then script.Parent.Parent.Timer.Text = "0"..Hours..":"..Minutes..":"..Seconds else else if Seconds > 9 then script.Parent.Parent.Timer.Text = "0"..Hours..":0"..Minutes..":"..Seconds else script.Parent.Parent.Timer.Text = "0"..Hours..":0"..Minutes..":0"..Seconds
Bundling 'if' statements into each other can cause errors. Place ends
at the end of each 'if' statement or use the elseif
condition.