Is it possible to make it so a repeat function will repeat until a value is equal to two, but if another value is equal to something then it will continue to repeat until that value is equal to something
Does this provide any help?
repeat
-- code
until v1 == 2 and v2 == x
You could also use a while loop. The only difference is that this is guaranteed to run once.
v1 is your first value, v2 is your second and the x is the undefined one.
Try this out (Just an example):
local TestValue1 = 0
local TestValue2 = 0
local Response = "Almost!"
while wait(1) do
print(Response)
if Response == "Hooray!" then
break
end
TestValue1 += 1
TestValue2 += 2
print(TestValue1)
print(TestValue2)
if TestValue2 == 10 then
Response = "Hooray!"
elseif TestValue1 == 2 and TestValue2 == 10 then
Response = "Hooray!"
end
end
Let me know if you need further help