I am making a TimeTable where it Countsdown from the NumberValue to 0, but I want it to re-count it down back to 0 again, instead of -1, -2, e.t.c. I even made another NumberValue to restore it back to it's original number, but it doesn't work. Also, this is on a SurfaceGUI.
while true do script.Parent.Text = script.Parent.TValue.Value wait(1) script.Parent.TValue.Value = script.Parent.TValue.Value - 1 if script.Parent.TValue == 0 then script.Parent.TValue = script.Parent.OValue - 1 end end
The mistake you made was that on line 6 and 7 you forgot to put a .Value after each of the numbers
The correct code would be :
while true do script.Parent.Text = script.Parent.TValue.Value wait(1) script.Parent.TValue.Value = script.Parent.TValue.Value - 1 if script.Parent.TValue.Value == 0 then -- Added .Value script.Parent.TValue.Value = script.Parent.OValue.Value - 1 -- Added .Value end end
If you have any questions, concerns or just need some help with this PM me on ROBLOX!