Ok. If you need to explain this in baby terms, let's think about that, loop are a "roadblock".
On Lua, you gotta run the code from the top, to the downest, right? But, the repeat loop "blocked" the route from the top, to the downest.
Let's see a sample like this:
x = 1
repeat
print("1 plus 1 is not 3!")
wait(1)
until 1 + 1 == 3
x = 2
So, if you executed the script, it will show full of printed text as "1 plus 1 is not 3!". Well, it's because it is on a loop, it will only pass when 1 plus 1 equals to 3, which is definitely impossible in mathematics terms.
But, what about the x value? Well, the repeat loop "blocked" the route from up, to down. So the x value is always 1, but not 2.
Your problem is pretty much alike. The Lua code cannot pass the repeat loop since the Value's value is never going to be true, because of the "roadblock" where I mentioned before. Instead, you can make a possible roadblock, like a repeat loop made timer, if the time is at a specific value, the Lua pass over the repeat loop roadblock and continuing the rest of the code.
Please note, scripts do not need to be put as a ServerScript. Normally, we would just use 2 scripts, Script or LocalScript. Also, do not put LocalScript into Game.ServerScriptService, it won't work.
3 comments
If you don't understand, you can reply on the comment below. I will 'repeatedly' explain this 'until' you understand. :)
i thought i could accept both answers but i couldnt well i didnt think repeat loops were this complex
i think i understood this pretty well so basically i just have to put code in between repeat and until to stop the loop