Technovalley = 0
while wait() do
Technovalley + 1
if Technovalley == 5 then
return end
end
end
✓ ANSWER ACCEPTED
How does one add a boolvalue variable in a while true do loop?
1 answer
✓ Accepted answer
I don't think you mean Bool values, as those are just either values that equates to true or false. Rather, I think you mean you need help adding with the "Technovalley" variable, which holds an integer. Also, you cannot use return to go out of the loop, as it only works for functions. You need to use break.
To add to that variable, all you need to do is:
local Technovalley = 0
while wait() do
--To add to a variable, do this:
Technovalley = Technovalley + 1
if Technovalley == 5 then
break
end
end
4 comments
0
This is why you don't use while wait() do. That could easily be shortened as while Technovalley ~= 5 do.
0
That is also true, however I am only fixing with what the OP has originally.
2
while wait() and Technovally < 5 do ... end @0x
2
you could just use a numeric for loop for this purpose :p
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
what does this even mean explain yourself
I think he wants to add + 1 using a loop, if that's what he means then you should do Technovalley = Technovalley + 1 (sorry if that's not what you mean.)