Loop not ending

My problem is (probably, I’m fairly new to scripting) simple.
I have a loop, and the loop is not ending (It’s an Until.)

local meter = script.Parent
local timer = meter.Size.X.Scale
print("Attempting to start...")
wait(1)
print("Timer Started.")
repeat
	print(timer)
	timer = timer + 0.1
	wait (0.1)
until timer == 1
print("Timer Done!")

I’d appreciate any help, if any!

What is in the output, errors?

That’s the problem. Nothing is in the output. Just an empty void, and a mess of the print messages from the script.

i have an idea!
try this:

local meter = script.Parent
local timer = Instance.new("IntValue")
timer.Value = meter.Size.X.Scale
print("Attempting to start...")
wait(1)
print("Timer Started.")
repeat
	print(timer)
	timer.Value = timer.Value + 0.1
	wait (0.1)
until timer.Value == 1
print("Timer Done!")

by the way, what is your meter size x scale anyway?

What is your script exactly and where is it located? local script, module script, script?

Meter is the parent, which is a frame in a surfaceGui.
@Wizard101fire90 the script is in a script, more info is ^.

mmm thats good thinking too. if the script is in the wrong place, or is the wrong type, the script will not run

The problem is you are trying to print an Instance and not the value.

replace that line with print(timer.Value)

um his local timer is a number and he said there is no error in the output. print timer wont be a problem but if there was an error that would be a good point

That gives me an error…

consider using a for loop, not a repeat

for i = 1, 10 do
  printer(timer.Value)
  timer.Value = i/10
  wait(.1)
end
1 Like

oh sorry, at first I was looking at your script and the one he was using