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!
Map1eMoose
(MapleMoose)
September 15, 2020, 10:04pm
2
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.
subt1e
(subt1e)
September 15, 2020, 10:05pm
4
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!")
subt1e
(subt1e)
September 15, 2020, 10:06pm
5
by the way, what is your meter size x scale anyway?
Map1eMoose
(MapleMoose)
September 15, 2020, 10:07pm
6
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 ^.
subt1e
(subt1e)
September 15, 2020, 10:08pm
8
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.
VercteButReal:
print(timer)
replace that line with print(timer.Value)
subt1e
(subt1e)
September 15, 2020, 10:09pm
10
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
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