Why doesn't this repeat?

Why isn’t this not working I mean I never use repeat functions so I’m not sure

repeat until hello.Value == 300
				script.Parent.Frame.TextLabel.Text = tostring(tonumber(script.Parent.Text) - 1)
				hello = hello + 1
			wait(1)

Solved version

local hello = 0
			
			while hello > 300 do
				script.Parent.Frame.TextLabel.Text = tostring(tonumber(script.Parent.Text) - 1)
				hello = hello + 1
				wait(1)
            end  

What you’re trying to repeat isn’t in the loop.
What you want is

repeat
    -- code here
until -- condition met

More information on loops can be found here

2 Likes
local hello = 0
repeat 
  script.Parent.Frame.TextLabel.Text = tostring(tonumber(script.Parent.Text) - 1)
  hello = hello + 1
  wait(1)
until hello == 30
2 Likes