Your repeat loop is probably going forever.
While the while loop has waits to let it stop, your repeat loop doesn't.
However, adding a wait isn't enough -- there's some other problem.
Likely, the script.Parent.Value isn't hitting 100 exactly. Maybe it got a fractional value (e.g., it hits 100.5) or it's bigger than 100 (e.g., 150).
In a worse case, it also might be NaN (the result of 0/0)
In any case, it won't ever satisfy == 100
You probably want to use until script.Parent.Value >= 100 instead, to fix these.
However, a repeat loop at all here is silly -- right now, it will always end in precisely setting it to 100. If you want the value to just be 100, set it to 100! If you want it to be at least 100, use math.max!
script.Parent.Value = math.max(100, script.Parent.Value)
2 comments
Because the 'repeat' loop does not have a 'wait' inside it; When a 'loop' does not have a wait, it attempts to run the chunk infinitely at once, thus the crashing; it is running too fast that it crashes the Client (or in this case, Your Studio).
I did that, and it doesnt change the value now.