How do I make a number increase and decrease in a loop?

So just a quick question but how do I make a number go between 1 and 10 and back again? I want this to happen while the right mouse button is pressed. I tried doing this with a while loop but it just gave me a never ending loop error. Is there some simple math function I could use that i just don’t know about? Is it the way I set it up? Any insight would be helpful.


Thank you for the quick reply everyone!

1 Like

Oooohhh… pipped at the post :slight_smile:

2 Likes

Bet no one saw this one coming :smiley:

3 Likes

Pfffttt!.. ( brain exploding )

Probably usable in some fringe-case scenario only.

All the solutions worked but I liked yours the best.

1 Like

Mine was the neatest though… :innocent:

2 Likes