xTravax Posted June 29, 2015 Share Posted June 29, 2015 hello, what would be easiest way to change value from e.g 0 to 20 (like goes up 0,1,2,3 to 20) and when it reaches 20 it goes to 0 like (20,19,28 to 0) and then starts doing this again over and over again(like a loop) thanks in advance Link to comment
Gr0x Posted June 29, 2015 Share Posted June 29, 2015 I made an example with the onClientRender event. There might be an easier way to do this, but this is what came into my mind. Untested. value = 0 des = false function onRender() value = value + (des and -1 or 1) if value >= 20 or value <= 0 then des = not des end end addEventHandler("onClientRender",root,onRender) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now