1 | repeat wait() until v.Value = = 1 |
I'm trying to make this repeat every time the value gets to 1.
What's actually happening : It works for the first time then the value changes to 2. When it's 1 again, the script doesn't do anything.
Any suggestions or solutions for this?
Your script works once since there is no loop to make it work every time. Try this
1 | while true do |
2 | wait(. 1 ) |
3 | if v.value ~ = 1 then |
4 | repeat wait() until v.value = = 1 |
5 | end |
6 | end |
Hope it helps